:root {
    --bg-soft: #fff9fb;
    --text-dark: #5D4B55;
    --primary-pink: #ff7eb9;
    --primary-purple: #a779e9;
    --accent-mint: #a0e7d5;
    --white: #ffffff;
    --border-light: #f2e7f0;
    --shadow-color: rgba(186, 104, 200, 0.1);
    --font-body: 'Nunito', sans-serif;
    --font-display: 'Pacifico', cursive;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-soft);
    color: var(--text-dark);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 30px 40px;
    border-radius: 25px;
    box-shadow: 0 15px 40px var(--shadow-color);
}

header {
    text-align: center;
    border-bottom: 2px dashed var(--border-light);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

h1 {
    font-family: var(--font-display);
    color: var(--primary-pink);
    font-size: 3em;
    margin: 0;
}

h2 {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--primary-purple);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 5px;
    margin-top: 50px;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-light);
    border-radius: 15px;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

thead {
    background-color: var(--bg-soft);
}

th {
    font-weight: 700;
    color: var(--primary-purple);
}

tbody tr {
    transition: background-color 0.2s ease-in-out;
}

tbody tr:nth-child(even) {
    background-color: var(--bg-soft);
}

tbody tr:hover {
    background-color: #fceef5;
}

code {
    background-color: #e7f5ff;
    color: #0077cc;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
}

.copy-btn {
    background-color: var(--border-light);
    color: var(--primary-purple);
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background-color: var(--primary-purple);
    color: var(--white);
}

.copy-btn.copied {
    background-color: var(--accent-mint);
    color: var(--text-dark);
}

.redeem-steps {
    list-style: none;
    padding-left: 0;
    counter-reset: step-counter;
}

.redeem-steps li {
    position: relative;
    background-color: var(--white);
    margin-bottom: 20px;
    padding: 20px 20px 20px 65px;
    border-radius: 15px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.redeem-steps li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 20px;
    top: 20px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: 700;
}

.redeem-steps li:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.step-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin-top: 15px;
    border-radius: 15px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.step-image:hover {
    transform: scale(1.02);
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 25px var(--shadow-color);
    margin-bottom: 30px;
}

footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.9em;
    color: #a79da3;
}

.tbc-section {
    margin-top: 50px;
    padding: 25px;
    text-align: center;
    background-color: var(--bg-soft);
    border: 2px dashed var(--border-light);
    border-radius: 15px;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 150px);
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    color: var(--white);
    padding: 16px 30px;
    border-radius: 50px;
    box-shadow: 0 10px 30px var(--shadow-color);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.1em;
    z-index: 2000;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-notification.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.toast-notification code {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 6px;
}

/* Filter and Search Styles */
.filter-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#searchInput {
    flex-grow: 1;
    min-width: 180px;
}

.select-wrapper {
    position: relative;
    display: inline-block;
    flex-grow: 1;
    min-width: 180px;
}

#searchInput, #rewardFilter {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 1em;
    background-color: var(--white);
    color: var(--text-dark);
    box-sizing: border-box;
    transition: all 0.2s ease;
}

#searchInput:focus, #rewardFilter:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 8px rgba(255, 126, 185, 0.3);
}

.select-wrapper::after {
    content: '▼';
    font-size: 0.7em;
    color: var(--primary-purple);
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

#rewardFilter {
    appearance: none;
}

.update-card {
    background: linear-gradient(135deg, #fff5f9 0%, #fff 100%);
    border: 2px solid #ffe0eb;
    border-radius: 18px;
    padding: 20px 25px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 20px rgba(255, 126, 185, 0.08);
}

.update-card p {
    margin: 0;
}

/* Ad Placeholders */
.ad-container {
    margin: 20px auto 50px auto;
    padding: 15px;
    background-color: var(--bg-soft);
    border: 1px dashed var(--border-light);
    border-radius: 10px;
    text-align: center;
}
.ad-label {
    font-size: 0.8em;
    color: #c5b9be;
    margin-bottom: 10px;
    display: block;
}
.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    background-color: #f7f2f5;
    border-radius: 5px;
    color: #c5b9be;
}

/* Main Layout */
.main-layout {
    display: flex;
    gap: 40px;
}

main {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.ad-placeholder-sidebar {
    height: 250px;
}

/* Responsive */
@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .sidebar h2 {
        margin-top: 60px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 2.2em;
    }

    .toast-notification {
        width: 90%;
        justify-content: center;
    }

    /* Compact Table Styles for Mobile */
    th, td {
        padding: 10px 8px;
        font-size: 0.9em;
    }

    th:nth-child(3), 
    td:nth-child(3) {
        display: none;
    }

    td:nth-child(2) {
        white-space: normal;
        min-width: 120px;
    }
}

.mobile-date {
    display: block;
    font-style: italic;
    color: #a79da3;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Image Modal (Lightbox) */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(50, 30, 40, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    border-radius: 10px;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from { transform: scale(0.8); opacity: 0 }
    to { transform: scale(1); opacity: 1 }
}

#caption {
    display: none;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--border-light);
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 700px){
    .modal-content {
        width: 100%;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}