/* public_html/css/style.css */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0; /* Remove default body margin */
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes full viewport height */
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0 0 5px 0;
    font-size: 2.5em;
}

header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    flex-grow: 1; /* Allow main content to grow and push footer down */
    padding: 30px 20px;
    max-width: 1200px; /* Max width for content */
    margin: 0 auto; /* Center the content */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Responsive grid */
    gap: 25px; /* Spacing between cards */
}

.tool-card {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push result to bottom if content is short */
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.tool-card h2 {
    color: #007bff; /* Primary color for tool titles */
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.6em;
}

.tool-card p {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 20px;
}

input[type="text"],
select {
    width: 100%; /* Full width within the card */
    padding: 12px;
    margin-bottom: 15px; /* Space below input */
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

button {
    width: 100%; /* Full width button */
    padding: 12px 20px;
    background-color: #28a745; /* Success green for buttons */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

button:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.result {
    margin-top: 20px;
    padding: 15px;
    background-color: #eaf0f6;
    border-left: 5px solid #007bff;
    border-radius: 5px;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #495057;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #d1e2f3; /* Lighter border for results */
}

.loading {
    color: #007bff;
    font-style: italic;
    animation: pulse 1.5s infinite;
}

.error {
    color: #dc3545;
    font-weight: bold;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 10px;
    border-radius: 5px;
}

footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

/* Keyframe for loading animation */
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr; /* Single column on smaller screens */
        padding: 20px 15px;
    }

    input[type="text"], select, button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2em;
    }
    header p {
        font-size: 1em;
    }
    .tool-card h2 {
        font-size: 1.4em;
    }
    button {
        font-size: 1em;
        padding: 10px 15px;
    }
}
