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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

header {
    background-color: #1a252f;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

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

header h1 {
    font-size: 1.5rem;
}

nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.nav-left {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-right {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-left: auto;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 2px solid transparent;
}

nav a:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
}

nav a.active {
    background-color: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.3);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: transparent;
}

.dropdown-btn {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid transparent;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dropdown-btn:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
}

.dropdown-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    border-radius: 8px;
    z-index: 1000;
    top: calc(100% + 0.5rem);
    left: 0;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.dropdown-content a {
    color: #2c3e50;
    padding: 0.9rem 1.2rem;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
    border-left-color: #3498db;
    padding-left: 1.4rem;
}

.dropdown.open .dropdown-content,
.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover::before {
    display: block;
}

.btn-auth {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.btn-auth:hover {
    background-color: #2980b9;
}

#user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#user-name {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
}

.auth-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.auth-warning p {
    color: #856404;
    font-size: 1.1rem;
    margin: 0;
}

main {
    padding: 2rem 0;
    min-height: calc(100vh - 120px);
}

/* Hero/Banner Section */
.hero-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem 0 3rem 0;
}

.banner-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: white;
}

.banner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.banner-card.vip-coupons {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.banner-card.vip-analyses {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

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

.banner-card h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.banner-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
}

/* Content Sections */
.content-section {
    margin-bottom: 4rem;
}

.section-title {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #3498db;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.no-items {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.coupon-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.coupon-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.coupon-card.won-coupon {
    border: 3px solid #27ae60;
    background: linear-gradient(to bottom right, #ffffff 0%, #f0fff4 100%);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}

.coupon-card.won-coupon:hover {
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.coupon-header {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.coupon-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    flex: 1;
    min-width: 150px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.status-won {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.status-lost {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.status-pending {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.coupon-sport {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.coupon-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.coupon-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 600;
    color: #2c3e50;
}

.detail-value.highlight {
    color: #27ae60;
    font-size: 1.1rem;
}

.coupon-description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.coupon-date {
    margin-top: 0.75rem;
    color: #95a5a6;
    font-size: 0.8rem;
}

.matches-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.matches-title {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.match-item {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    align-items: center;
}

.match-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.match-prediction {
    color: #555;
    font-size: 0.9rem;
}

.match-odds {
    color: #27ae60;
    font-weight: 600;
    text-align: right;
    font-size: 0.95rem;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Analysis Cards */
.analysis-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #3498db;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.analysis-header {
    margin-bottom: 1rem;
}

.analysis-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.analysis-details {
    margin-bottom: 1rem;
}

.analysis-content {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.analysis-date {
    color: #95a5a6;
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

.admin-section {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
}

textarea {
    resize: vertical;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    width: 100%;
    padding: 0.75rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 1rem;
}

.btn-secondary:hover {
    background-color: #2980b9;
}

.btn-secondary:active {
    transform: scale(0.98);
}

.match-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr auto;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    align-items: center;
}

.match-row input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.match-row input:focus {
    outline: none;
    border-color: #3498db;
}

.btn-delete {
    padding: 0.5rem 1rem;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

#matches-container {
    margin-bottom: 1rem;
}

.message {
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: none;
}

.message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.analysis-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.analysis-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

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

.switch-container label {
    margin-bottom: 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #27ae60;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.manage-coupons-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.manage-coupons-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

#coupons-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.coupon-manage-item {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.coupon-manage-info {
    flex: 1;
    min-width: 200px;
}

.coupon-manage-info strong {
    display: block;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.coupon-status {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.coupon-manage-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-success {
    padding: 0.5rem 1rem;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    padding: 0.5rem 1rem;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

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

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-left,
    .nav-right {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .nav-right {
        margin-left: 0;
    }
    
    .dropdown {
        width: 100%;
    }
    
    .dropdown-btn {
        width: 100%;
        text-align: left;
    }
    
    .dropdown-content {
        position: relative;
        box-shadow: none;
        margin-top: 0;
        border: 1px solid #e0e0e0;
    }
    
    nav a {
        width: 100%;
        text-align: center;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .banner-card {
        padding: 2rem 1.5rem;
    }
    
    .banner-icon {
        font-size: 3rem;
    }
    
    .banner-card h2 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .coupon-manage-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .coupon-manage-actions {
        width: 100%;
    }
    
    .btn-success,
    .btn-danger {
        flex: 1;
    }
}

/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.tab-btn.active {
    color: #2c3e50;
    background-color: white;
    border-bottom-color: #3498db;
    font-weight: 600;
}

.tab-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: -2px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

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

@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
        gap: 0;
    }
    
    .tab-btn {
        border-bottom: 1px solid #e0e0e0;
        border-left: 3px solid transparent;
    }
    
    .tab-btn.active {
        border-bottom-color: #e0e0e0;
        border-left-color: #3498db;
    }
}

/* Article Feed Styles */
.article-feed {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
}

.article-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.article-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    background-color: #f0f0f0;
}

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

.article-content {
    padding: 2rem;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.article-date {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1.25rem;
}

.article-preview {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.read-more-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #3498db;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.read-more-link:hover {
    background-color: #3498db;
    color: white;
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .article-image {
        height: 250px;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    .article-preview {
        font-size: 1rem;
    }
}

/* Analysis Detail Page Styles */
.analysis-detail {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 2rem;
}

.analysis-detail-image {
    width: 100%;
    height: 500px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.analysis-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.analysis-detail-content {
    padding: 3rem;
}

.analysis-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.analysis-detail-date {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.analysis-detail-text {
    font-size: 1.2rem;
    color: #34495e;
    line-height: 1.8;
    margin-bottom: 3rem;
    white-space: pre-wrap;
}

.back-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #3498db;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: #3498db;
    color: white;
    transform: translateX(-5px);
}

.error-message {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    margin-top: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.error-message h2 {
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-message p {
    color: #7f8c8d;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .analysis-detail-image {
        height: 300px;
    }
    
    .analysis-detail-content {
        padding: 2rem 1.5rem;
    }
    
    .analysis-detail-title {
        font-size: 1.8rem;
    }
    
    .analysis-detail-text {
        font-size: 1.1rem;
    }
}
