/**
 * Ana Sayfa (Home) Stilleri - Mobile First
 */

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    margin: 0;
    padding: 0;
}

/* ==================== Dikey Bannerlar ==================== */
.side-banner {
    display: block;
    position: fixed;
    top: 70px;
    z-index: 80;
}

.side-banner img {
    display: block;
    width: 48px;
    height: auto;
    max-height: 170px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.side-banner-left {
    left: 3px;
}

.side-banner-right {
    right: 3px;
}

/* ==================== Mobil Bannerlar (Gizli) ==================== */
.mobile-banners {
    display: none;
}

/* ==================== Hero GIF ==================== */
.hero-gif {
    display: block;
    margin: 12px auto;
    text-align: center;
}

a.hero-gif {
    display: block;
    text-decoration: none;
}

.hero-gif img {
    display: inline-block;
    height: 50px;
    width: auto;
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(236, 204, 12, 0.4);
}

/* ==================== Header ==================== */
.header {
    background: linear-gradient(135deg, #49662E 0%, #3a5225 100%);
    border-bottom: 2px solid #ECCC0C;
    padding: 0 15px;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-actions {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-admin {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(236, 204, 12, 0.2);
    border: 1px solid #ECCC0C;
    border-radius: 6px;
    color: #ECCC0C;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-admin:hover {
    background: #ECCC0C;
    color: #1a2e1e;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo img {
    height: 40px;
    width: auto;
}

.header-logo span {
    font-size: 22px;
    font-weight: 700;
    color: #ECCC0C;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ==================== Main Content ==================== */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    padding-left: 55px;
    padding-right: 55px;
    width: 100%;
}

/* ==================== Hero Title Section ==================== */
.hero-section {
    background: linear-gradient(135deg, #49662E 0%, #2d4a1a 50%, #1a2e10 100%);
    border-radius: 16px;
    padding: 25px 15px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(236, 204, 12, 0.3);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(236, 204, 12, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(236, 204, 12, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.hero-title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-title span {
    color: #ECCC0C;
}

.hero-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    margin: 0;
}

.hero-actions {
    margin-top: 10px;
}

.btn-add-kasa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ECCC0C 0%, #d4b70a 100%);
    border-radius: 25px;
    color: #1a2e1e;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(236, 204, 12, 0.3);
}

.btn-add-kasa:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(236, 204, 12, 0.5);
    color: #1a2e1e;
}

/* ==================== Kasa Grid ==================== */
.kasa-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* ==================== Kasa Card ==================== */
.kasa-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.kasa-card:active {
    transform: scale(0.98);
}

/* Admin Actions on Card */
.kasa-admin-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.admin-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.admin-btn:hover {
    transform: scale(1.1);
}

.admin-btn.edit {
    background: linear-gradient(135deg, #49662E 0%, #3a5225 100%);
    color: #fff;
}

.admin-btn.edit:hover {
    background: linear-gradient(135deg, #5a7a3a 0%, #49662E 100%);
    color: #fff;
}

.admin-btn.delete {
    background: linear-gradient(135deg, #dc3545 0%, #b52d3a 100%);
    color: #fff;
}

.admin-btn.delete:hover {
    background: linear-gradient(135deg, #e74c5c 0%, #dc3545 100%);
    color: #fff;
}

.kasa-image {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.kasa-image img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.kasa-name {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #ECCC0C;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    z-index: 2;
    white-space: nowrap;
    border: 1px solid rgba(236, 204, 12, 0.3);
}

.kasa-footer {
    padding: 12px;
    background: linear-gradient(135deg, #49662E 0%, #3a5225 100%);
    border-top: 1px solid rgba(236, 204, 12, 0.3);
}

.btn-open {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ECCC0C 0%, #d4b70a 100%);
    border: none;
    border-radius: 10px;
    color: #1a2e1e;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 10px rgba(236, 204, 12, 0.3);
}

.btn-open:active {
    transform: scale(0.95);
}

.btn-open i {
    font-size: 14px;
}

/* ==================== No Results ==================== */
.no-results {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 50px;
    margin-bottom: 15px;
    opacity: 0.5;
    color: #ECCC0C;
}

.no-results p {
    font-size: 16px;
    margin: 0;
}

/* ==================== Footer ==================== */
.footer {
    background: linear-gradient(135deg, #49662E 0%, #3a5225 100%);
    border-top: 2px solid #ECCC0C;
    padding: 15px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    margin: 0;
}

/* ==================== Modal ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid #49662E;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #49662E 0%, #3a5225 100%);
    border-bottom: 2px solid #ECCC0C;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 16px;
    color: #ECCC0C;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
    text-align: center;
    overflow-y: auto;
    flex: 1;
}

/* ==================== Kasa Opening ==================== */
.kasa-opening {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    animation: kasaPulse 1s ease-in-out infinite;
}

.kasa-acik-img {
    max-width: 150px;
    filter: drop-shadow(0 0 20px rgba(236, 204, 12, 0.5));
}

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

/* ==================== Reward Spinner ==================== */
.reward-spinner {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
}

.spinner-container {
    position: relative;
    height: 180px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border: 2px solid #49662E;
}

.spinner-track {
    display: flex;
    gap: 10px;
    padding: 10px;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    align-items: center;
    will-change: transform;
}

.spinner-item {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.spinner-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.spinner-item.winner-glow {
    border-color: #ECCC0C !important;
    box-shadow: 0 0 25px rgba(236, 204, 12, 0.8), 0 0 50px rgba(236, 204, 12, 0.4) !important;
    animation: winnerPulse 0.5s ease-in-out 3;
}

@keyframes winnerPulse {
    0%, 100% { box-shadow: 0 0 25px rgba(236, 204, 12, 0.8), 0 0 50px rgba(236, 204, 12, 0.4); }
    50% { box-shadow: 0 0 40px rgba(236, 204, 12, 1), 0 0 80px rgba(236, 204, 12, 0.6); }
}

.spinner-indicator {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ECCC0C 0%, #d4b70a 100%);
    z-index: 10;
    box-shadow: 0 0 15px rgba(236, 204, 12, 0.8);
}

.spinner-indicator::before,
.spinner-indicator::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
}

.spinner-indicator::before {
    top: -2px;
    border-top-color: #ECCC0C;
}

.spinner-indicator::after {
    bottom: -2px;
    border-bottom-color: #ECCC0C;
}

/* ==================== Reward Result ==================== */
.reward-result {
    padding: 15px 0;
}

.congrats-title {
    font-size: 32px;
    font-weight: 800;
    color: #ECCC0C;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(236, 204, 12, 0.5);
}

.won-reward {
    background: linear-gradient(135deg, rgba(73, 102, 46, 0.3) 0%, rgba(73, 102, 46, 0.1) 100%);
    border: 3px solid #ECCC0C;
    border-radius: 20px;
    padding: 25px;
    margin: 0 auto 20px;
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: winPulse 2s ease-in-out infinite;
}

.won-reward img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@keyframes winPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(236, 204, 12, 0.4); }
    50% { box-shadow: 0 0 40px rgba(236, 204, 12, 0.7); }
}

.reward-result p {
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    font-size: 14px;
}

.btn-claim {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    background: linear-gradient(135deg, #ECCC0C 0%, #d4b70a 100%);
    color: #1a2e1e !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.btn-claim:hover {
    background: linear-gradient(135deg, #f5dc4a 0%, #ECCC0C 100%);
    color: #1a2e1e !important;
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(236, 204, 12, 0.5);
}

.btn-claim:active {
    transform: scale(0.95);
    color: #1a2e1e !important;
}

/* ==================== Tablet (768px+) ==================== */
@media (min-width: 768px) {
    .header {
        height: 70px;
        padding: 0 20px;
    }
    
    .header-logo img {
        height: 50px;
    }
    
    .btn-admin {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .main-content {
        padding: 30px 20px;
        padding-left: 75px;
        padding-right: 75px;
    }
    
    .hero-section {
        padding: 35px 25px;
        margin-bottom: 25px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .hero-gif img {
        height: 60px;
    }
    
    .side-banner {
        top: 80px;
    }
    
    .side-banner img {
        width: 60px;
        max-height: 220px;
    }
    
    .kasa-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .kasa-image {
        aspect-ratio: 3 / 2;
    }
    
    .kasa-name {
        font-size: 14px;
        padding: 8px 18px;
    }
    
    .kasa-footer {
        padding: 15px;
    }
    
    .btn-open {
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 30px;
    }
    
    .kasa-acik-img {
        max-width: 180px;
    }
    
    .won-reward {
        width: 280px;
        height: 280px;
        padding: 30px;
    }
}

/* ==================== Desktop (1024px+) ==================== */
@media (min-width: 1024px) {
    .main-content {
        padding-left: 100px;
        padding-right: 100px;
    }
    
    .hero-section {
        padding: 45px 35px;
    }
    
    .hero-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .hero-text {
        text-align: left;
    }
    
    .hero-title {
        font-size: 38px;
    }
    
    .hero-gif img {
        height: 70px;
    }
    
    .side-banner img {
        width: 80px;
        max-height: 300px;
    }
    
    .kasa-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    .kasa-card:hover {
        border-color: #ECCC0C;
        transform: translateY(-8px);
        box-shadow: 0 15px 50px rgba(236, 204, 12, 0.25);
    }
    
    .kasa-card:hover .kasa-image img {
        transform: scale(1.08);
    }
    
    .kasa-image img {
        transition: transform 0.3s ease;
    }
    
    .btn-open:hover {
        box-shadow: 0 4px 25px rgba(236, 204, 12, 0.5);
        transform: translateY(-2px);
        background: linear-gradient(135deg, #f5dc4a 0%, #ECCC0C 100%);
    }
}

/* ==================== Large Desktop (1400px+) ==================== */
@media (min-width: 1400px) {
    .main-content {
        padding-left: 180px;
        padding-right: 180px;
    }
    
    .side-banner {
        top: 100px;
    }
    
    .side-banner img {
        width: 150px;
        max-height: 500px;
    }
    
    .side-banner-left {
        left: 15px;
    }
    
    .side-banner-right {
        right: 15px;
    }
    
    .side-banner:hover img {
        transform: scale(1.02);
        box-shadow: 0 8px 30px rgba(236, 204, 12, 0.3);
    }
    
    .hero-title {
        font-size: 44px;
    }
    
    .hero-gif img {
        height: 85px;
    }
    
    .kasa-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==================== Extra Large Desktop (1600px+) ==================== */
@media (min-width: 1600px) {
    .main-content {
        padding-left: 200px;
        padding-right: 200px;
    }
    
    .side-banner img {
        width: 170px;
        max-height: 600px;
    }
    
    .side-banner-left {
        left: 20px;
    }
    
    .side-banner-right {
        right: 20px;
    }
}
