/* WordPress Subnet Practice Styles - Add to Appearance > Customize > Additional CSS */

.subnet-practice-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.subnet-hero-section {
    padding: 4rem 0 3rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    margin: 0 -2rem 3rem;
    border-radius: 12px;
}

.subnet-hero-content h1 {
    color: #1e293b;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: inherit;
}

.subnet-hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.subnet-hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.subnet-stat-item {
    text-align: center;
}

.subnet-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: #1e293b;
}

.subnet-stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Learning Section */
.subnet-learning-section {
    margin-bottom: 4rem;
}

/* Difficulty and Problem Type Selectors */
.subnet-difficulty-selector, .subnet-problem-type-selector {
    display: inline-block;
    margin: 1rem 2rem 1rem 0;
}

.subnet-difficulty-selector label, .subnet-problem-type-selector label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.subnet-difficulty-select, .subnet-problem-type-select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    min-width: 200px;
}

/* Timer */
.subnet-problem-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.subnet-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #6b7280;
}

.subnet-timer-label {
    font-size: 0.875rem;
}

#subnet-timer-display {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #1e293b;
    padding: 0.25rem 0.5rem;
    background: #f1f5f9;
    border-radius: 4px;
}

.subnet-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.subnet-section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    color: #111827;
}

.subnet-section-header p {
    font-size: 1.125rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Practice Container */
.subnet-practice-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Cards */
.subnet-problem-card, .subnet-answers-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.subnet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.subnet-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #111827;
}

.subnet-score-display {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

/* Problem Content */
.subnet-problem-content {
    padding: 2rem;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    background: #f8fafc;
    border-radius: 8px;
    margin: 1.5rem;
    min-height: 120px;
}

.subnet-problem-content h3 {
    font-family: inherit;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #374151;
}

.subnet-problem-content p strong {
    color: #1e293b;
    font-size: 1.25rem;
}

/* Answer Grid */
.subnet-answer-grid {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.subnet-input-group {
    display: flex;
    flex-direction: column;
}

.subnet-input-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.subnet-input-group input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.subnet-input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.subnet-input-group input.correct {
    border-color: #10b981;
    background-color: #ecfdf5;
}

.subnet-input-group input.incorrect {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* Buttons */
.subnet-btn-primary, .subnet-btn-secondary, .subnet-btn-outline {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
    line-height: 1.4;
}

/* Elementor compatibility fixes */
.elementor-widget .subnet-btn-primary,
.elementor-widget .subnet-btn-secondary, 
.elementor-widget .subnet-btn-outline,
.elementor-widget .subnet-btn-info,
.elementor-widget .subnet-btn-formula {
    margin: 0;
    font-family: inherit;
}

.subnet-btn-primary {
    background: #3b82f6;
    color: white;
}

.subnet-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.subnet-btn-secondary {
    background: #6b7280;
    color: white;
}

.subnet-btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.subnet-btn-outline {
    background: transparent;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.subnet-btn-outline:hover {
    background: #3b82f6;
    color: white;
}

.subnet-btn-info {
    background: #0ea5e9;
    color: white;
}

.subnet-btn-info:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

.subnet-btn-formula {
    background: #8b5cf6;
    color: white;
}

.subnet-btn-formula:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.subnet-action-buttons {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Feedback */
.subnet-feedback-card {
    margin: 0 1.5rem 1.5rem;
    padding: 1rem;
    border-radius: 6px;
    font-weight: 500;
}

.subnet-feedback-card.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.subnet-feedback-card.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.subnet-feedback-card.info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.hidden {
    display: none !important;
}

/* Step-by-step and Formula Cards */
.subnet-step-card, .subnet-formula-card {
    margin: 0 1.5rem 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    animation: slideDown 0.3s ease-out;
}

.subnet-step-card h4, .subnet-formula-card h4 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.subnet-step-card ol {
    margin: 0;
    padding-left: 1.5rem;
}

.subnet-step-card li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.subnet-formula-card .formula-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #8b5cf6;
}

.subnet-formula-card .formula-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.subnet-formula-card .formula-text {
    font-family: 'Courier New', monospace;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subnet-input-group input.correct {
    animation: correctPulse 0.6s ease-out;
}

.subnet-input-group input.incorrect {
    animation: incorrectShake 0.6s ease-out;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Info Section */
.subnet-info-section {
    padding: 3rem 0;
    background: #f8fafc;
    margin: 0 -2rem;
    border-radius: 12px;
}

.subnet-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.subnet-info-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.subnet-info-card h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.subnet-info-card p {
    color: #64748b;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Elementor text size overrides */
.elementor-widget .subnet-info-card p {
    font-size: 0.95rem !important;
}

.elementor-widget .subnet-info-card h3 {
    font-size: 1.25rem !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .subnet-practice-wrapper {
        padding: 0 1rem;
    }
    
    .subnet-hero-section {
        margin: 0 -1rem 2rem;
        padding: 2rem 0;
    }
    
    .subnet-hero-content h1 {
        font-size: 2rem;
    }
    
    .subnet-hero-stats {
        gap: 1.5rem;
    }
    
    .subnet-practice-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .subnet-answer-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .subnet-action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .subnet-difficulty-selector, .subnet-problem-type-selector {
        display: block;
        margin: 1rem 0;
    }
    
    .subnet-difficulty-select, .subnet-problem-type-select {
        min-width: 100%;
    }
    
    .subnet-problem-controls {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .subnet-card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .subnet-score-display {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .subnet-info-section {
        margin: 0 -1rem;
    }
    
    .subnet-info-grid {
        padding: 0 1rem;
        grid-template-columns: 1fr;
    }
}