/*
 * Main CSS File for Crib Score website
 * Contains consolidated styles for the entire site
 */

/* ===== COMMON VARIABLES ===== */
:root {
    /* Colors from app's ColorExtension.swift */
    --background: #1F201F;
    --text: #D8DBE2;
    --quaternary: #2A2B2A;
    --quaternary-active: #414241;
    --secondary: #A9BCD0;
    --secondary-active: #8A96A6;
    --player1: #58A4B0;
    --player1-active: #3D7C85;
    --player2: #FF8C42;
    --player2-active: #E47831;
}

/* ===== BASE STYLES ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--background);
    color: var(--text);
    position: relative;
    overflow-x: hidden;
}

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

/* Club background - very subtle */
.club-background {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -40%);
    font-size: 650px;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
    color: var(--quaternary);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

h1 {
    font-size: 48px;
    letter-spacing: 1px;
}

h2 {
    font-size: 36px;
    letter-spacing: 0.75px;
}

h3 {
    font-size: 24px;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.text-center {
    text-align: center;
}

.accent-line {
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary);
    margin: 16px auto 40px;
}

/* Links */
a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ===== LAYOUT COMPONENTS ===== */
header {
    padding: 60px 0;
    text-align: center;
    position: relative;
}

.header-large {
    padding: 80px 0 10px;
}

.header-small {
    padding: 40px 0 10px;
}

.header-content {
    position: relative;
    z-index: 1;
}

.section {
    padding: 60px 0;
    position: relative;
    z-index: 1;
}

footer {
    padding: 40px 0;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

footer p {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* ===== COMMON COMPONENTS ===== */

/* App icon styling */
.app-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-icon:hover {
    transform: translateY(-5px);
}

/* Taglines and subtitles */
.tagline {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* Card and box styling */
.card {
    background-color: var(--quaternary);
    padding: 30px;
    border-radius: 4px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

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

.card h3 {
    margin-bottom: 16px;
    position: relative;
}

.card p {
    opacity: 0.9;
}

/* Button styling */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--player1);
    color: var(--background);
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.btn:hover {
    background: var(--player1-active);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background-color: var(--secondary);
    color: var(--background);
}

/* ===== SPECIFIC COMPONENTS ===== */

/* Feature cards grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--quaternary);
    padding: 30px;
    border-radius: 4px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

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

.feature-card.player1 h3 {
    color: var(--player1);
}

.feature-card.player2 h3 {
    color: var(--player2);
}

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    position: relative;
}

.feature-card p {
    opacity: 0.9;
    line-height: 1.7;
}

/* Add subtle card suit icons */
.feature-card:before {
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 80px;
    opacity: 0.05;
    transition: opacity 0.4s ease;
}

.feature-card:hover:before {
    opacity: 0.1;
}

/* Alternating card symbols */
.feature-card:nth-child(4n+1):before {
    content: "♦"; /* Diamond */
}

.feature-card:nth-child(4n+2):before {
    content: "♠"; /* Spade */
}

.feature-card:nth-child(4n+3):before {
    content: "♥"; /* Heart */
}

.feature-card:nth-child(4n+4):before {
    content: "♣"; /* Club */
}

/* Content formatting for privacy page */
.content-area h2 {
    color: var(--player1);
    margin: 30px 0 15px;
    font-size: 24px;
}

.content-area h3 {
    color: var(--player2);
    margin: 25px 0 10px;
    font-size: 20px;
}

.content-area ul, .content-area ol {
    margin: 15px 0 20px 20px;
}

.content-area li {
    margin-bottom: 8px;
}

.info-box {
    background-color: var(--quaternary);
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
}

.info-box h3 {
    margin-top: 0;
}

.meta-text {
    margin-top: 50px;
    font-style: italic;
    opacity: 0.7;
}

/* Form styling */
.form-group {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

input[type="email"] {
    flex: 1;
    padding: 16px;
    border: none;
    background-color: var(--quaternary);
    color: var(--text);
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

input[type="email"]:focus {
    background-color: var(--quaternary-active);
    outline: none;
}

form button {
    background: var(--player1);
    color: var(--background);
    border: none;
    padding: 0 24px;
    border-radius: 0 4px 4px 0;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
}

form button:hover {
    background: var(--player1-active);
}

/* ===== CAROUSEL STYLING ===== */
.carousel-container {
    max-width: 375px;
    margin: 0 auto;
    position: relative;
    padding: 0 30px 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.slick-carousel {
    margin: 0 auto;
    max-width: 100%;
}

.slick-carousel img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    margin: 0 auto;
    display: block;
    background-color: transparent;
}

.slick-slide {
    overflow: visible !important;
    background: transparent;
    padding-bottom: 20px;
}

.slick-list {
    overflow: visible !important;
    background: transparent;
}

.slick-track {
    background: transparent;
}

/* Arrow styling */
.slick-prev,
.slick-next,
.slick-prev:hover,
.slick-next:hover,
.slick-prev:focus,
.slick-next:focus,
.slick-prev:active,
.slick-next:active {
    z-index: 100;
    width: 40px;
    height: 40px;
    background-color: transparent;
    border-radius: 50%;
    opacity: 0.7;
    transition: 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    padding: 0;
}

.slick-prev,
.slick-prev:hover,
.slick-prev:focus,
.slick-prev:active {
    left: -25px;
}

.slick-next,
.slick-next:hover,
.slick-next:focus,
.slick-next:active {
    right: -25px;
}

.slick-prev:hover,
.slick-next:hover,
.slick-prev:focus,
.slick-next:focus,
.slick-prev:active,
.slick-next:active {
    opacity: 1;
    background-color: transparent;
}

.slick-prev:before,
.slick-next:before,
.slick-prev:hover:before,
.slick-next:hover:before,
.slick-prev:focus:before,
.slick-next:focus:before,
.slick-prev:active:before,
.slick-next:active:before {
    font-size: 20px;
    line-height: 1;
    color: var(--text);
    opacity: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dots styling */
.slick-dots li button:before {
    color: var(--quaternary);
    opacity: 0.7;
}

.slick-dots li.slick-active button:before {
    color: var(--secondary);
    opacity: 1;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 450px) {
    .carousel-container {
        max-width: 90%;
    }
}

@media (max-width: 767px) {
    .slick-prev {
        left: -20px;
    }

    .slick-next {
        right: -20px;
    }
}

/* Download section styling */
.download-section {
    padding: 20px 0 40px;
}

.download-section .app-store-badge {
    margin-bottom: 25px; /* Increase this value for more space */
}

.download-section .app-icon {
    margin-top: 0;
}

.app-store-badge {
    margin: 5px auto;
    display: block;
}

@media (max-width: 768px) {
    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 30px;
    }

    h3 {
        font-size: 22px;
    }

    .tagline {
        font-size: 18px;
    }

    .app-icon {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .form-group {
        flex-direction: column;
        width: 100%;
    }

    input[type="email"] {
        border-radius: 4px;
        margin-bottom: 10px;
    }

    form button {
        width: 100%;
        padding: 16px;
        border-radius: 4px;
    }

    .feature-card:hover {
        transform: translateY(-3px);
    }

    .content-area h2 {
        font-size: 22px;
    }

    .content-area h3 {
        font-size: 18px;
    }
}
