/* Basic Reset & Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'StrickenBrush';
    src: url('/assets/StrickenBrush.ttf') format('truetype');
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* Header */
header {
    background: #333;
    color: #fff;
    padding: 1rem 0;
    border-bottom: #0779e4 3px solid;
    width: 100%;
}

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

.server-logo-banner {
    height: 50px;
    width: auto;
    display: block;
}

header nav ul {
    list-style: none;
    padding: 0;
}

header nav ul li {
    display: inline;
    margin-left: 20px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-family: 'StrickenBrush', sans-serif;
    font-size: 1rem;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: #0779e4;
}

/* Hero Section (index.html) */
.hero {
    background: url('/assets/logos/background.png') no-repeat center center/cover;
    height: 60vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

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

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.hero .server-ip {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    background-color: rgba(0,0,0,0.6);
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

.hero .player-count {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-align: center;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: #0779e4;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0568bf;
}

.btn-secondary {
    background-color: #5cb85c;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #4cae4c;
}

.btn-secondary.added {
    background-color: #4CAF50; /* Slightly different green */
    cursor: default;
}

.btn-danger {
    background-color: #e74c3c; /* Red for destructive actions */
    color: #fff;
    padding: 8px 15px; /* Slightly smaller padding for non-primary actions */
    font-size: 0.9rem;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-discord {
    background-color: #5865F2; /* Discord Blurple */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between logo and text */
    padding: 10px 15px;
    font-weight: bold;
    width: 100%; /* Make button full width of its container */
    max-width: 300px; /* Optional: set a max-width */
    margin: 0 auto 1rem auto; /* Center button if it's not full width */
}

.btn-discord:hover {
    background-color: #4752C4;
}

.discord-btn-logo {
    width: 20px;
    height: 20px;
}


.btn-large {
    padding: 15px 30px;
    font-size: 1.2rem;
    width: 100%;
    margin-top: 1rem;
}


/* Main Content & Sections (index.html & basket.html) */
main {
    padding: 2rem 0;
    flex-grow: 1; /* Makes main content take available space */
}

.categories, .packages, .basket-contents, .order-summary {
    margin-bottom: 2rem;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.categories h2, .packages h2, .basket-contents h2, .order-summary h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
    font-family: 'StrickenBrush', sans-serif;
    font-size: 1.8rem;
}

/* Category Buttons (index.html) */
.category-list {
    text-align: center;
    margin-bottom: 1rem;
}

.category-btn {
    background-color: #e7e7e7;
    color: #333;
    padding: 8px 15px;
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.category-btn:hover, .category-btn.active {
    background-color: #0779e4;
    color: #fff;
    border-color: #0779e4;
}

/* Package Grid & Cards (index.html) */
.package-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Display 3 columns */
    gap: 1.5rem;
}

.package-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}


.package-card img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Makes the image a square */
    object-fit: cover; /* Ensures the image covers the square area, cropping if necessary */
}

.package-info {
    padding: 1rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.package-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.package-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.package-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
}

/* Basket Page Specific Styles (basket.html) */
.basket-page .container {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Basket items on left, summary on right */
    gap: 2rem;
}

.basket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.basket-header h2 {
    margin: 0;
    text-align: left; /* Override centered style */
}

.basket-item-list {
    list-style: none;
    padding: 0;
}

.basket-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}
.basket-item:last-child {
    border-bottom: none;
}

.basket-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}

.basket-item-details {
    flex-grow: 1;
}
.basket-item-details h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}
.basket-item-details p {
    font-size: 0.9rem;
    color: #666;
}

.basket-item-quantity {
    display: flex;
    align-items: center;
    margin: 0 1rem;
}
.basket-item-quantity span {
    padding: 0 0.75rem;
    font-weight: bold;
}
.quantity-btn {
    background-color: #eee;
    border: 1px solid #ccc;
    color: #333;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 23px; /* Vertically center text */
    text-align: center;
}
.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.basket-item-subtotal {
    font-weight: bold;
    min-width: 70px; /* Ensure consistent width */
    text-align: right;
    margin-right: 1rem;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}
.remove-item-btn:hover {
    color: #c0392b;
}

.empty-basket-message {
    text-align: center;
    padding: 2rem;
    color: #777;
    font-style: italic;
}

.order-summary .summary-details p {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 1rem;
}
.order-summary .summary-details p.total {
    font-weight: bold;
    font-size: 1.2rem;
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

/* Discord Connection Area */
.discord-connection-area {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #ccc;
    text-align: center;
}
.discord-connection-area h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}
.discord-user-info-display {
    display: flex; /* Changed from none by default, JS will handle visibility */
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
}
.discord-avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #5865F2; /* Discord Blurple */
}
.discord-user-info-display p {
    font-size: 1rem;
    color: #333;
}
.discord-status-message {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.5rem;
    min-height: 1.2em; /* Reserve space for messages */
}


/* Responsive adjustments */
@media (max-width: 992px) { /* Tablets and larger phones */
    .package-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns */
    }
}

@media (max-width: 768px) { /* Stack basket and summary on smaller screens */
    .basket-page .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) { /* Smaller phones */
    .package-grid {
        grid-template-columns: 1fr; /* 1 column */
    }
}


/* Footer */
footer {
    background: #333;
    color: #aaa;
    text-align: center;
    padding: 2rem 0;
    width: 100%;
}

footer a {
    color: #0779e4;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}
/* --- Payment Success Page Styles --- */
.payment-success-container {
    background-color: #fff;
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    margin: 2rem 0;
}

.payment-success-container h1 {
    font-size: 2.5rem;
    color: #4CAF50; /* Green for success */
    margin-bottom: 1rem;
}

.payment-success-container .order-id-message {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.payment-success-container .order-id-message strong {
    color: #333;
    font-family: 'Courier New', Courier, monospace;
}

.payment-success-container .instructions {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    text-align: left;
    border-left: 5px solid #0779e4;
}

.payment-success-container .purchased-items {
    margin-bottom: 2rem;
    text-align: left;
}

.payment-success-container .purchased-items h2 {
    text-align: center;
    margin-bottom: 1rem;
}

#purchased-items-list {
    list-style-type: none;
    padding: 0;
}

#purchased-items-list li {
    background-color: #f9f9f9;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

#purchased-items-list li:last-child {
    border-bottom: none;
}

.order-summary .summary-details p.total {
    font-weight: bold;
    font-size: 1.2rem;
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

/* --- Voucher/Gift Card Area Styles --- */
.voucher-area {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#code-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

#apply-code-btn {
    padding: 10px 15px;
    flex-shrink: 0;
}

.status-message {
    width: 100%;
    margin-top: 5px;
    font-size: 0.9rem;
    min-height: 1.2em;
}

.discount-row {
    color: #28a745; /* Green for discount text */
}