* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b6b;
    --primary-dark: #ff5252;
    --secondary: #4ecdc4;
    --secondary-dark: #45b7b0;
    --dark: #1a1a2e;
    --darker: #0f0f1a;
    --light: #f0f0f0;
    --gray: #888;
    --success: #4CAF50;
    --warning: #ff9800;
    --danger: #f44336;
    --info: #2196F3;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    color: var(--light);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    color: var(--secondary);
    margin: 30px 0 20px;
    font-size: 1.8rem;
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}

h3 {
    color: var(--secondary);
    margin-bottom: 15px;
}

h4 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.navbar {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(78, 205, 196, 0.2);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-links a:hover {
    background: rgba(78, 205, 196, 0.2);
    color: var(--secondary);
}

.btn, .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    font-weight: 500;
    border: none;
    font-size: 0.9rem;
}

.btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.btn-small {
    display: inline-block;
    padding: 4px 10px;
    margin: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-small:hover {
    background: rgba(78, 205, 196, 0.3);
}

.giveaways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.giveaway-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.giveaway-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.giveaway-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.giveaway-content {
    padding: 20px;
}

.giveaway-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--secondary);
}

.giveaway-meta, .giveaway-stats {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 0.85rem;
    color: var(--gray);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
    border-radius: 30px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.ad-container {
    margin: 20px 0;
    text-align: center;
    min-height: 90px;
}

.adblock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.adblock-card {
    background: linear-gradient(135deg, var(--dark), var(--darker));
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    border: 2px solid var(--primary);
}

.adblock-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
}

/* USER DROPDOWN - TYLKO NA KLIKNIĘCIE, WYŚRODKOWANY */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    object-fit: cover;
}

.user-info span {
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    min-width: 200px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

/* Strzałka wskazująca na przycisk */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--dark);
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: var(--light);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background: var(--secondary);
    color: var(--dark);
}

/* LANGUAGE SELECTOR - TYLKO NA KLIKNIĘCIE, WYŚRODKOWANY */
.lang-selector {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    min-width: 150px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

/* Strzałka wskazująca na przycisk języka */
.lang-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--dark);
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--light);
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}

.lang-dropdown a:hover {
    background: var(--secondary);
    color: var(--dark);
}

.empty-state {
    text-align: center;
    padding: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin: 40px 0;
    color: var(--gray);
}

.filters {
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.filter-form select {
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--secondary);
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

.filter-form input {
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--secondary);
    border-radius: 8px;
    color: white;
}

.filters-bar {
    margin: 20px 0;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Formularz tworzenia rozdania */
.giveaway-form {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary);
    font-weight: 500;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--secondary);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--gray);
    font-size: 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: background 0.2s;
}

.radio-label:hover, .checkbox-label:hover {
    background: rgba(78, 205, 196, 0.1);
}

.radio-label input, .checkbox-label input {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: flex-end;
}

/* Alerty */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: rgba(76, 175, 80, 0.2);
    border-left: 4px solid var(--success);
    color: #4CAF50;
}

.alert-error {
    background: rgba(244, 67, 54, 0.2);
    border-left: 4px solid var(--danger);
    color: #f44336;
}

/* Info box */
.info-box {
    margin-top: 30px;
    padding: 20px;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 15px;
    border-left: 4px solid var(--secondary);
}

.info-box ul {
    margin-left: 20px;
    margin-top: 10px;
}

.info-box li {
    margin-bottom: 5px;
}

/* Podgląd gry */
.game-preview {
    margin-bottom: 25px;
    animation: fadeIn 0.3s ease;
}

.preview-card {
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(78, 205, 196, 0.3);
    align-items: center;  /* To wyśrodkowuje wszystkie elementy w pionie */
}

.preview-card img {
    width: 150px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;  /* Zapobiega zmniejszaniu obrazka */
}

.preview-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* Wyśrodkowanie tekstu w pionie */
}

.preview-info h3 {
    color: var(--secondary);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.preview-info p {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0;
}

/* Styl dla wyszukiwarki gier */
.search-wrapper {
    position: relative;
    width: 100%;
}

#gameSearch {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--secondary);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    transition: all 0.3s;
}

#gameSearch:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.2);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border: 1px solid var(--secondary);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: rgba(78, 205, 196, 0.1);
    /* USUNIĘTE transform: translateX(5px) */
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-name {
    font-weight: 500;
    color: #fff;
    margin-bottom: 2px;
}

.search-result-id {
    font-size: 0.75rem;
    color: #888;
}

.search-result-empty {
    padding: 20px;
    text-align: center;
    color: #888;
}

/* Tabela danych */
.data-table {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
}

.data-table th, 
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    background: rgba(78, 205, 196, 0.2);
    color: var(--secondary);
    font-weight: 600;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Statystyki */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary);
}

.stat-label {
    color: var(--gray);
    margin-top: 5px;
    font-size: 0.85rem;
}

/* Profile */
.profile-header {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(78, 205, 196, 0.2));
    border-radius: 20px;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--secondary);
    margin-bottom: 20px;
    object-fit: cover;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-active {
    background: var(--success);
    color: white;
}

.status-scheduled, .status-upcoming {
    background: var(--info);
    color: white;
}

.status-ended {
    background: var(--gray);
    color: white;
}

.status-cancelled {
    background: var(--danger);
    color: white;
}

.status-pending {
    background: var(--warning);
    color: var(--dark);
}

.status-received {
    background: var(--success);
    color: white;
}

/* Key display */
.key-display {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.key-display code {
    display: block;
    margin-top: 5px;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Szczegóły rozdania */
.giveaway-detail {
    max-width: 1000px;
    margin: 0 auto;
}

.detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.detail-image {
    width: 300px;
    border-radius: 15px;
    object-fit: cover;
}

.detail-info {
    flex: 1;
}

.detail-description, 
.detail-participants, 
.detail-comments {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.participant {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 30px;
}

.participant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.participant-level {
    font-size: 0.75rem;
    color: gold;
}

/* Komentarze */
.comment-form {
    margin-bottom: 20px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--secondary);
    border-radius: 8px;
    color: white;
    margin-bottom: 10px;
    font-family: inherit;
}

.comment {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-content strong {
    color: var(--secondary);
}

.comment-content small {
    color: var(--gray);
    font-size: 0.75rem;
    margin-left: 10px;
}

.comment-content p {
    margin-top: 5px;
}

/* Animacje */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsywność */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    .giveaways-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .filter-form {
        justify-content: center;
    }
    
    .giveaway-form {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .form-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .preview-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .preview-card img {
        width: 100%;
        height: auto;
        max-height: 150px;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .detail-image {
        width: 100%;
        max-width: 300px;
    }
    
    .data-table {
        font-size: 0.85rem;
        overflow-x: auto;
        display: block;
    }
    
    .data-table th, 
    .data-table td {
        padding: 8px;
    }
    
    .comment {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .btn, .btn-primary {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .giveaway-title {
        font-size: 1.1rem;
    }
}