/* Base Styles for Web Development Tools */

* {
    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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.nav {
    margin-bottom: 20px;
}

.nav a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.nav a:hover {
    opacity: 1;
}

/* Card Layouts */
.calculator-card,
.generator-card,
.tool-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Headers */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    color: #5a67d8;
    font-size: 2.5em;
    margin-bottom: 15px;
}

.header p {
    font-size: 1.1em;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Form Elements */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #5a67d8;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Buttons */
.calculate-btn,
.generate-btn,
.optimize-btn,
.random-btn {
    background: linear-gradient(135deg, #5a67d8, #667eea);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    margin: 20px 0;
}

.calculate-btn:hover,
.generate-btn:hover,
.optimize-btn:hover,
.random-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(90,103,216,0.3);
}

.calculate-btn:disabled,
.generate-btn:disabled,
.optimize-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.copy-btn,
.export-btn,
.action-btn {
    background: #f7fafc;
    color: #5a67d8;
    border: 2px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.copy-btn:hover,
.export-btn:hover,
.action-btn:hover {
    background: #5a67d8;
    color: white;
    border-color: #5a67d8;
}

/* Result Sections */
.result {
    margin-top: 30px;
    padding: 30px;
    border-radius: 15px;
    color: white;
    display: none;
}

.result h2 {
    font-size: 2.2em;
    margin-bottom: 15px;
    text-align: center;
}

/* Grid Layouts */
.specs-grid,
.metrics-grid,
.time-breakdown,
.score-breakdown,
.result-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.spec-item,
.breakdown-item,
.stat-item {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.spec-item h4,
.breakdown-item h4 {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.spec-value,
.breakdown-value,
.breakdown-score {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

/* Control Groups */
.controls,
.control-group {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.control-group h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 600;
}

/* Feature Grids */
.features-grid,
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: #5a67d8;
    background: #f0f4ff;
}

.feature-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.feature-title {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 0.9em;
    color: #666;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #48bb78;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Status Messages */
.status-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    font-weight: 500;
    display: none;
}

.status-success {
    background: #f0fff4;
    color: #38a169;
    border: 1px solid #9ae6b4;
}

.status-error {
    background: #fed7d7;
    color: #e53e3e;
    border: 1px solid #feb2b2;
}

/* Checkbox Groups */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.checkbox-item:hover {
    border-color: #5a67d8;
    background: #f0f4ff;
}

.checkbox-item.selected,
.checkbox-item.checked {
    border-color: #48bb78;
    background: #f0fff4;
}

.checkbox-item input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #48bb78;
}

.checkbox-item label {
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    flex: 1;
}

/* Section Labels */
.section-label {
    font-size: 1.2em;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
    display: block;
}

/* Hidden Elements */
.hidden,
.image-canvas {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .calculator-card,
    .generator-card,
    .tool-card {
        padding: 25px;
        margin: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .form-grid,
    .features-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .specs-grid,
    .metrics-grid,
    .time-breakdown,
    .score-breakdown,
    .result-breakdown {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}


