/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

/* Tab buttons */
.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 24px;
    border: none;
    background: #ecf0f1;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #bdc3c7;
    transform: translateY(-2px);
}

.tab-button.active {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Main container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tools grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin: 2rem auto;
    max-width: 1400px;
    padding: 0 2rem;
}

/* Tool cards */
.tool-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.tool-card h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

/* Form elements */
input, textarea, select {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3498db;
}

textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'Courier New', monospace;
}

/* Buttons */
button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin: 5px;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

button:active {
    transform: translateY(0);
}

/* Preformatted text (for results) */
pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    max-height: 300px;
    overflow-y: auto;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: white;
    background: rgba(44, 62, 80, 0.9);
    margin-top: 3rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tab-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-button {
        width: 200px;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.success {
    border-color: #27ae60 !important;
}

.error {
    border-color: #e74c3c !important;
}