/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fef9f7;
    background-image: 
        radial-gradient(#ffd6e7 1px, transparent 1px),
        radial-gradient(#e1f5e9 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
}

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

/* Шапка */
header {
    background: linear-gradient(135deg, #ff66a3 0%, #ff99c8 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(255, 102, 163, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo .tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

.btn-outline {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: white;
    color: #ff66a3;
}

/* Секции */
section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #d81b60;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.decoration {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.decoration i {
    color: #ff4081;
    font-size: 1.2rem;
}

/* Карточка с информацией о розыгрыше */
.contest-card {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 102, 163, 0.15);
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
}

.contest-card-header {
    background: linear-gradient(135deg, #ff4081 0%, #ff66a3 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contest-card-header h3 {
    font-size: 1.8rem;
    font-weight: 600;
}

.date-badge {
    background-color: white;
    color: #ff4081;
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.contest-card-content {
    padding: 30px;
}

.intro-text {
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.7;
    padding-bottom: 20px;
    border-bottom: 1px dashed #eee;
}

.promo-code {
    display: inline-block;
    background-color: #ffebee;
    color: #d81b60;
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border: 2px dashed #ff4081;
}

.prize-info {
    display: flex;
    align-items: center;
    background-color: #f9f0ff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.prize-icon {
    font-size: 2.5rem;
    color: #ff9800;
    margin-right: 20px;
}

.prize-text h4 {
    color: #7b1fa2;
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.step {
    display: flex;
    gap: 20px;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff4081 0%, #ff66a3 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-content h4 {
    color: #d81b60;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.step-content ul {
    list-style-type: none;
    padding-left: 0;
}

.step-content li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.step-content li:before {
    content: "•";
    color: #ff4081;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

.promo-code-small {
    background-color: #ffebee;
    color: #d81b60;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: #4c75a3;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #3b5a7a;
    transform: translateY(-2px);
}

.draw-info {
    background-color: #e8f5e9;
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
}

.draw-info h4 {
    color: #2e7d32;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #ff4081 0%, #ff66a3 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(255, 64, 129, 0.3);
}

.note {
    background-color: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.note i {
    color: #1976d2;
    font-size: 1.5rem;
}

/* Секция с партнерами */
.partners-section {
    background-color: #f9f5ff;
    border-top: 1px solid #e1d5f5;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 500px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

#searchInput {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #ff4081;
    box-shadow: 0 0 0 3px rgba(255, 64, 129, 0.1);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    font-weight: 500;
    color: #555;
}

#sortSelect {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
}

#sortSelect:focus {
    outline: none;
    border-color: #ff4081;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    background-color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

thead {
    background: linear-gradient(135deg, #7b1fa2 0%, #9c27b0 100%);
    color: white;
}

thead th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

thead th i {
    margin-left: 8px;
    font-size: 0.9rem;
}

tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

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

tbody td {
    padding: 15px;
    color: #444;
}

tbody td:first-child {
    font-weight: 600;
    color: #7b1fa2;
}

tbody a {
    display: inline-block;
    padding: 8px 15px;
    background-color: #e8f5e9;
    color: #2e7d32;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #c8e6c9;
}

tbody a:hover {
    background-color: #2e7d32;
    color: white;
    transform: translateY(-2px);
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

#resultCount {
    font-weight: 600;
    color: #555;
}

.pagination {
    display: flex;
    gap: 8px;
}

.page-btn {
    padding: 8px 15px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background-color: #f5f5f5;
}

.page-btn.active {
    background: linear-gradient(135deg, #ff4081 0%, #ff66a3 100%);
    color: white;
    border-color: #ff4081;
}

/* Футер */
footer {
    background: linear-gradient(135deg, #2e003e 0%, #4a148c 100%);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo p {
    opacity: 0.8;
    line-height: 1.7;
}

.footer-join h4, .footer-social h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-join p {
    opacity: 0.9;
    margin-bottom: 10px;
    line-height: 1.6;
}

.contact-email {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 1.1rem;
}

.contact-email a {
    color: #ffcc80;
    text-decoration: none;
    font-weight: 500;
}

.contact-email a:hover {
    text-decoration: underline;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background-color: #4c75a3;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background-color: #3b5a7a;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-bottom p {
    margin-bottom: 8px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo h1 {
        justify-content: center;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .contest-card-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .sort-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-footer {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo h3, .footer-join h4, .footer-social h4 {
        justify-content: center;
    }
    
    .contact-email {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .contest-card-header h3 {
        font-size: 1.4rem;
    }
    
    .contest-card-content {
        padding: 20px;
    }
    
    thead th {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    
    tbody td {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    
    .btn, .social-link, .social-btn {
        width: 100%;
        justify-content: center;
    }
}