/*     *{}                -   Universal selector           */
/*     #id{}              -   ID selector                  */
/*     .class{}           -   Class selector               */
/*     h1,h2{}            -   Type selector                */
/*     h1+p{}             -   Adjacent sibling selector    */
/*     ul>li{}            -   Child selector               */
/*     h1~p{}             -   General sibling selector     */
/*     p af{}             -   Descendant selector          */
/*     div[att="val"] {}  -   Attribute selector           */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #303030, #343434, #303030);
    min-height: 100vh;
    color: rgb(255, 255, 255);
    overflow-x: hidden;
    position: relative;
}



nav,
.home-section,
.cube-section {
    position: relative;
    z-index: 10;
}

nav {
    display: flex;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1)
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;

}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.logo-text {
    background: linear-gradient(135deg, #ffffff, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-page {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.home-page.hidden {
    display: none;
}

.main-title {
    font-size: 7rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* To make text color of the linear gradient background */
    background-clip: text;
    letter-spacing: -2px;
}

/* using padding is a better alternative than height and width */

.sub-title {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 800px;
    margin: 0 auto 4rem;
    line-height: 1.5;
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.mode-card {
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.8), rgba(60, 60, 60, 0.6));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.mode-card:hover::before {
    opacity: 1;
}

.mode-card:hover {
    transform: translateY(-12px) scale(1.05);
    border-color: var(--card-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px var(--card-color-alpha);
}

.mode-card.timer {
    --card-color: #06b6d4;
    --card-color-alpha: rgba(6, 182, 212, 0.3);

}

.mode-card.f2l {
    --card-color: #10b981;
    --card-color-alpha: rgba(16, 185, 129, 0.3);
}

.mode-card.oll {
    --card-color: #f97316;
    --card-color-alpha: rgba(249, 115, 22, 0.3);
}

.mode-card.pll {
    --card-color: #3b82f6;
    --card-color-alpha: rgba(59, 130, 246, 0.3);
}

.mode-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(60, 60, 60, 0.8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    transition: all 0.4s;
}

.mode-card:hover .mode-icon {
    transform: scale(1.3) rotateY(10deg);
    background: var(--card-color);
}

.mode-title {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.mode-description {
    color: #94a3b8;
    line-height: 1.6;
    font-size: 0.95rem;

}

.cube-section {
    display: none;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.cube-contents {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.cube-left-section {
    position: sticky;
    top: 120px;
    width: 60%;
    max-width: 60%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;

}

.cube-right-section {
    width: 40%;
    max-width: 40%;
    gap: 1.5rem;
}


.cube-section.active {
    display: block;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.back-button {
    width: 100%;
    position: sticky;
    bottom: 2rem;
    left: 2rem;
    background: rgba(59, 130, 246, 0.2);
    border: 2px solid #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    z-index: 50;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.back-button:hover {
    background: rgba(59, 130, 246, 0.4);
    transform: translateX(-5px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.cube-container {
    width: 100%;
    height: 500px;
    border-radius: 20px;
    background: rgba(20, 20, 20, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}


.bottom-row {
    display: flex;
    width: 100%;
    gap: 1rem;
    justify-content: flex-end;
}

.speed-controls {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem;
}


.feedback-btn {
    font-size: 1rem;
    border: 2px solid black;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-weight: 600;
    justify-content: flex-end;
    color: black;
}

.feedback-btn:hover {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
    transition: all 0.3s;
}

.algorithm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 1rem;
}

.alg-card {
    background: rgba(40, 40, 40, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.alg-card:hover {
    border-color: #10b981;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.alg-card.active {
    /* .active and :active are different, .active is a class while :active is a pseudo-class */
    outline: 2px solid royalblue;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px royalblue;
}

.alg-title {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #10b981;
}

.alg-moves {
    color: #94a3b8;
    font-size: 0.9rem;
}

.alg-notes {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #cbd5e1;
    padding: 0.5rem;

}