/* ============================================
   Kinda Hard Golf - Main Styles
   Golf-themed design with modern aesthetics
   ============================================ */

/* Custom Properties */
:root {
    --primary-color: #4CAF50;
    --primary-light: #81C784;
    --primary-dark: #2E7D32;
    --accent-color: #FF6B6B;
    --accent-hover: #FF5252;
    --bg-color: #3085D4;
    --bg-main: #3085D4;
    --bg-footer: #16A34A;
    --bg-white: #FFFFFF;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --text-light: #95A5A6;
    --text-white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --shadow-xl: 0 12px 24px rgba(0,0,0,0.18);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: #3085D4;
    min-height: 100vh;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Navigation */
.navbar {
    background: #3085D3;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: var(--transition);
}

.nav-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
}

.logo-icon {
    font-size: 2rem;
}

.logo:hover {
    color: rgba(255, 255, 255, 0.9);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 4rem 0 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    color: white;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    animation: fadeInUp 0.8s ease 0.4s both;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.2) rotate(5deg);
}

.stat-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Quicksand', sans-serif;
    margin-bottom: 0.25rem;
}

.stat-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Subtle floating animation for first card icon */
.stat-card:nth-child(1) .stat-icon {
    animation: float 3s ease-in-out infinite;
}

/* Subtle pulse animation for second card icon */
.stat-card:nth-child(2) .stat-icon {
    animation: pulse 2s ease-in-out infinite;
}

/* Subtle rotate animation for third card icon */
.stat-card:nth-child(3) .stat-icon {
    animation: wiggle 2.5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(3deg); }
    75% { transform: rotate(-3deg); }
}

/* Game Section */
.game-section {
    padding: 2rem 0 4rem;
    background: #3085D4;
}

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

.game-container {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    margin-bottom: 1.5rem;
    position: relative;
}

/* Mobile-specific game container adjustments */
@media screen and (max-width: 768px) {
    .game-container {
        overflow-y: auto; /* Allow vertical scrolling if needed */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
}

.game-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.game-iframe {
    width: 100%;
    height: 700px;
    border: none;
    display: block;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 700px;
    gap: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-cta-play {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53) !important;
    color: white !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    padding: 0.875rem 2rem !important;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3) !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    animation: ctaPulse 2s infinite;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    cursor: pointer !important;
    border-radius: var(--radius-md) !important;
    transition: all 0.3s ease !important;
}

.btn-cta-play::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-cta-play:hover::before {
    left: 100%;
}

.btn-cta-play:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4) !important;
    background: linear-gradient(135deg, #FF8E53, #FF6B6B) !important;
}

.btn-cta-play svg {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

@keyframes ctaPulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 107, 0.5);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.link-arrow {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.link-arrow:hover {
    transform: translateX(5px);
}

/* Pro Tips Section */
.tips-rotation {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0;
}

.tip-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.tip-content {
    margin-bottom: 1.5rem;
}

.tip-content strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-family: 'Quicksand', sans-serif;
}

.tip-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.tip-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.tip-refresh:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow-md);
}

.tip-refresh:active {
    transform: scale(0.95);
}

.tip-refresh svg {
    transition: transform 0.3s ease;
}

.tip-refresh:hover svg {
    transform: translateX(3px);
}

/* Animation for tip icon */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(2deg); }
    75% { transform: translateY(-5px) rotate(-2deg); }
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: #3085D4;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: white;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* CTA Section */
.cta {
    padding: 4rem 0;
    background: #3085D4;
    text-align: center;
    color: white;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.cta h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Footer */
.footer {
    background: #16A34A;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 2rem;
    align-items: start;
}

@media (max-width: 968px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
        row-gap: 3rem;
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    transform: scale(1.2);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.footer-logo .logo-icon {
    font-size: 2rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.share-text {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    font-family: monospace;
    line-height: 1.8;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Score Input Section */
.score-input-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #F5F5F5;
    border-radius: var(--radius-md);
}

.score-input-section label {
    font-weight: 600;
    color: var(--text-primary);
}

.score-input {
    width: 80px;
    padding: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    background: white;
}

.score-input:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

#scoreDisplay {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1em;
}

@media screen and (max-width: 768px) {
    .game-container {
        position: relative;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Golf Pattern Background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, transparent 50%, rgba(76, 175, 80, 0.03) 50%),
        radial-gradient(circle at 80% 20%, transparent 50%, rgba(76, 175, 80, 0.03) 50%),
        radial-gradient(circle at 40% 40%, transparent 50%, rgba(76, 175, 80, 0.02) 50%);
    background-size: 100px 100px;
    pointer-events: none;
    opacity: 0.5;
    z-index: -1;
}