/* Global 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;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.3em;
    color: #7f8c8d;
    margin-bottom: 0;
}

/* Navigation */
.nav {
    background: rgba(255,255,255,0.95);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav a {
    color: #667eea;
    text-decoration: none;
    margin: 0 15px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav a:hover, .nav a.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Main Content */
main {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Day Cards */
.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.day-card {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 25px;
    border: 3px solid #667eea;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.day-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.day-header h3 {
    font-size: 1.5em;
    color: #2980b9;
    margin-bottom: 5px;
}

.day-title {
    font-size: 1.1em;
    color: #7f8c8d;
    font-weight: 500;
}

.day-content {
    flex-grow: 1;
    margin: 20px 0;
}

.day-content h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.day-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.day-content li {
    margin-bottom: 5px;
    color: #555;
}

.day-highlight {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-top: 15px;
}

.day-link {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
}

.day-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Concept Sections */
.concept {
    background: #f8f9fa;
    border-left: 5px solid #667eea;
    padding: 25px;
    margin: 30px 0;
    border-radius: 0 10px 10px 0;
}

.concept h2 {
    color: #2980b9;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.concept h3 {
    color: #2c3e50;
    margin: 20px 0 10px 0;
}

/* Exercise Sections */
.exercise {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
}

.exercise h3 {
    color: #d68910;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.exercise-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

/* Info Boxes */
.important {
    background: #f8d7da;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.important-title {
    color: #721c24;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tip {
    background: #d1ecf1;
    border: 2px solid #17a2b8;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.tip-title {
    color: #0c5460;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.steps {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.steps-title {
    color: #155724;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Code Blocks */
.code-block {
    background: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    position: relative;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
}

.code-title {
    background: #4a5568;
    color: white;
    padding: 8px 15px;
    margin: -20px -20px 15px -20px;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-btn {
    background: #48bb78;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #38a169;
    transform: scale(1.05);
}

.copy-btn:active {
    background: #2f855a;
}

/* Solution Sections */
.solution {
    background: #e8f5e8;
    border: 2px solid #28a745;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

.solution-header {
    background: #28a745;
    color: white;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.solution-header:hover {
    background: #218838;
}

.solution-content {
    padding: 20px;
    display: none;
}

.solution-content.show {
    display: block;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

/* Setup Steps */
.setup-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.step-number {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h4 {
    color: #2c3e50;
    margin-bottom: 8px;
}

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

.tip-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-top: 4px solid #667eea;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.tip-card h4 {
    color: #2980b9;
    margin-bottom: 10px;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 20px;
    margin-top: 40px;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: none;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2.2em;
    }
    
    .days-grid {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 25px;
    }
    
    .nav a {
        margin: 5px;
        display: inline-block;
    }
}

/* Dropdown Navigation for Days */
.nav details.dropdown-nav {
    position: relative;
    display: inline-block;
    margin: 0 15px; /* Align with other nav items */
}

.nav details.dropdown-nav summary {
    color: #667eea;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
    list-style: none; /* Remove default arrow */
    display: inline-block; /* Make summary behave like a block for padding/margin */
}

.nav details.dropdown-nav summary::-webkit-details-marker {
    display: none; /* Remove default arrow for webkit browsers */
}

.nav details.dropdown-nav summary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.nav details.dropdown-nav[open] summary {
    background: #667eea;
    color: white;
}

.nav .dropdown-content {
    display: none; /* Hidden by default */
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 8px;
    padding: 10px 0;
    left: 50%; /* Center dropdown */
    transform: translateX(-50%); /* Center dropdown */
    max-height: 300px; /* Limit height */
    overflow-y: auto; /* Add scroll if too many items */
}

.nav details.dropdown-nav[open] .dropdown-content {
    display: block; /* Show when details is open */
}

.nav .dropdown-content a {
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    text-align: left;
    border-radius: 0; /* Remove border-radius from individual links */
    margin: 0; /* Remove margin from individual links */
}

.nav .dropdown-content a:hover {
    background-color: #ddd;
    color: #333;
    transform: none; /* Remove transform on hover for dropdown items */
}

.nav .dropdown-content a.active {
    background-color: #667eea;
    color: white;
}