/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(to bottom right, #f9fafb, #ffffff);
    min-height: 100vh;
}

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

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right, #166534, #15803d);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 0.75rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: white;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.logo-text {
    font-family: Georgia, serif;
    font-size: 1.25rem;
}

.nav-desktop {
    display: none;
    gap: 2rem;
}

.nav-link {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #15803d;
}

.nav-link.active {
    background: white;
    color: #166534;
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-mobile {
    padding-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link-mobile {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
}

.nav-link-mobile:hover {
    background: #15803d;
}

.nav-link-mobile.active {
    background: white;
    color: #166534;
}

/* Main Content */
.main-content {
    padding-top: 4rem;
    min-height: calc(100vh - 8rem);
}

/* Footer Styles */
.footer {
    background: linear-gradient(to right, #14532d, #166534);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-text p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    background: none;
    border: none;
    color: white;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #fde047;
}

/* Hero Section */
.hero {
    background: linear-gradient(to bottom right, #166534, #15803d, #16a34a);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #fbbf24;
    color: #1f2937;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-size: 1.25rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.btn-play:hover {
    background: #fde047;
    transform: scale(1.05);
}

.hero-small {
    background: linear-gradient(to bottom right, #166534, #15803d, #16a34a);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.hero-small h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Section Styles */
.section {
    padding: 4rem 0;
}

.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card h2 {
    font-size: 1.875rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #166534;
}

.card p, .card li {
    color: #4b5563;
    margin-bottom: 1rem;
}

.card ul {
    margin-left: 1.5rem;
}

.rules-card {
    background: linear-gradient(to bottom right, #f0fdf4, #dcfce7);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-box {
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-box.green {
    background: linear-gradient(to bottom right, #16a34a, #15803d);
    color: white;
}

.feature-box.yellow {
    background: linear-gradient(to bottom right, #fbbf24, #f59e0b);
    color: #1f2937;
}

.feature-box.blue {
    background: linear-gradient(to bottom right, #2563eb, #1d4ed8);
    color: white;
}

.feature-box.purple {
    background: linear-gradient(to bottom right, #9333ea, #7e22ce);
    color: white;
}

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

.feature-box h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Solitaire Game Styles */
.game-header {
    background: linear-gradient(to right, #15803d, #16a34a);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: white;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-new-game {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #15803d;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-new-game:hover {
    background: #fde047;
}

.win-message {
    background: linear-gradient(to right, #fbbf24, #fde047);
    color: #1f2937;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.win-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.game-board {
    background: linear-gradient(to bottom right, #15803d, #16a34a, #15803d);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

.top-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tableau {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.card-slot {
    aspect-ratio: 2/3;
    position: relative;
}

.card-pile {
    min-height: 200px;
    position: relative;
}

.empty-slot {
    width: 100%;
    height: 100%;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
}

.empty-slot.foundation {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    color: #fde047;
}

.empty-slot.stock {
    border-color: #4ade80;
    cursor: pointer;
    transition: all 0.3s;
}

.empty-slot.stock:hover {
    border-color: #86efac;
}

.playing-card {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 0.5rem;
    border: 2px solid #d1d5db;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.playing-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.playing-card.draggable {
    cursor: move;
}

.playing-card.face-down {
    background: linear-gradient(to bottom right, #2563eb, #1e40af);
    border-color: #1e3a8a;
    cursor: default;
}

.card-back {
    width: 100%;
    height: 100%;
    background: #1d4ed8;
    border-radius: 0.25rem;
    margin: 0.125rem;
    opacity: 0.5;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
}

.card-corner {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.card-corner.top {
    text-align: left;
}

.card-corner.bottom {
    text-align: right;
    transform: rotate(180deg);
}

.card-rank {
    font-size: 0.875rem;
}

.card-suit {
    font-size: 1.25rem;
}

.card-center {
    text-align: center;
    font-size: 2rem;
}

.red {
    color: #dc2626;
}

.black {
    color: #1f2937;
}

.card-absolute {
    position: absolute;
    width: 100%;
    aspect-ratio: 2/3;
    left: 0;
}

/* Contact Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #16a34a;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    background: #15803d;
}

.success-message {
    text-align: center;
    padding: 3rem 0;
}

.success-icon {
    font-size: 4rem;
    color: #16a34a;
    margin-bottom: 1rem;
}

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

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

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

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

.max-w-4xl {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .nav-mobile {
        display: none !important;
    }
    
    .hero-content h1 {
        font-size: 3.75rem;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .top-row {
        gap: 1rem;
    }
    
    .tableau {
        gap: 1rem;
    }
    
    .game-board {
        padding: 2rem;
    }
}

/* Page Specific Styles */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.page-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6b7280;
}

.info-box {
    background: linear-gradient(to bottom right, #dcfce7, #bbf7d0);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.back-link {
    margin-top: 2rem;
    text-align: center;
}

.back-link button {
    background: none;
    border: none;
    color: #15803d;
    text-decoration: underline;
    cursor: pointer;
    font-size: 1rem;
}

.back-link button:hover {
    color: #16a34a;
}

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .btn-play,
    .btn-new-game {
        display: none;
    }
}
