/* ====== Global Styles ====== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fafafa;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* ====== Header ====== */
header {
    background: linear-gradient(135deg, #00509e, #0077cc);
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

header h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
    letter-spacing: 1px;
}

/* ====== Navigation (Rubik Cube Theme) ====== */
nav {
    background-color: #f2f5f9;
    padding: 2px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 2px;
}

nav li {
    flex: 1;
}

nav a {
    display: block;
    text-align: center;
    padding: 15px 0;
    font-weight: bold;
    text-decoration: none;
    color: black;
    border-radius: 0;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 0.85;
}

/* Mobile nav adjustments */
@media (max-width: 700px) {
    nav ul { flex-wrap: wrap; }
    nav li { flex: 1 1 45%; margin-bottom: 4px; }
    nav a { padding: 12px 0; font-size: 1rem; }
}

/* Rubik cube colors */
nav li:nth-child(1) a { background-color: #ffffff; }
nav li:nth-child(2) a { background-color: #c41e3a; }
nav li:nth-child(3) a { background-color: #ff6f00; }
nav li:nth-child(4) a { background-color: #009e60; }
nav li:nth-child(5) a { background-color: #0051ba; }
nav li:nth-child(6) a { background-color: #f2e23d; }
nav li:nth-child(7) a { background-color: #8200ff; }

/* ====== Main Content ====== */
main {
    padding: 2rem;
    max-width: 900px;
    margin: auto;
}

/* Sections / Cards */
section {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease;
}

section:hover { transform: scale(1.01); }

/* Bubble sections with stronger colors */
.section-bubble {
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    color: #000;
}

.bubble-white   { background-color: rgba(255, 255, 255, 0.95); }
.bubble-yellow  { background-color: rgba(242, 226, 61, 0.85); }
.bubble-red     { background-color: rgba(196, 30, 58, 0.85); }
.bubble-blue    { background-color: rgba(0, 81, 186, 0.85); }
.bubble-green   { background-color: rgba(0, 158, 96, 0.85); }
.bubble-orange  { background-color: rgba(255, 111, 0, 0.85); }

/* ====== Images ====== */
main img, .photo-card img, .step img {
    display: block;
    margin: 15px auto;
    max-width: 100%;
    max-height: 300px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

.photo-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin: 20px 0;
}

.photo-card {
    flex: 1 1 auto;
    text-align: center;
}

figcaption, .caption, .step p, .photocard p {
    text-align: center;
    margin-top: 8px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* Tutorial steps */
.step {
    margin: 25px 0;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

/* ====== Timer ====== */
#timerContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 120px;
    text-align: center;
    width: 100%;
}

#timerDisplay {
    font-size: 6rem;
    font-weight: bold;
    font-family: Arial, sans-serif;
    margin-bottom: 20px;
}

#timerButtons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 15px;
}

#timerButtons button {
    font-size: 1.1rem;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.timer-instructions { font-size: 1.2rem; color: #555; }
.timer-started { animation: flashStart 0.3s ease-out; }

/* ====== Footer ====== */
footer {
    background-color: #00509e;
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    margin-top: 3rem;
}
