* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.close-btn {
    background: none;
    border: none;
    color: #4A90E2;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
}

.header-title {
    text-align: center;
    flex: 1;
}

.header-title h1 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.subtitle {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 2px;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4A90E2 0%, #9B7EDE 100%);
    padding: 32px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.hero-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin: 0 auto 16px;
    max-width: 280px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.app-name {
    font-size: 20px;
    font-weight: 700;
    color: #6B46C1;
    margin: 0;
}

.tagline {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Services */
.services {
    padding: 24px 20px;
}

.service-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.service-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.service-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    text-align: center;
}

.service-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #4A90E2;
    color: #fff;
}

.btn-primary:active {
    background: #357ABD;
    transform: scale(0.98);
}

.btn-outline {
    background: #fff;
    color: #4A90E2;
    border: 2px solid #4A90E2;
}

.btn-outline:active {
    background: #f0f7ff;
    transform: scale(0.98);
}

/* Responsive */
@media (max-width: 480px) {
    .hero {
        padding: 24px 16px;
    }
    
    .hero-card {
        padding: 20px;
        max-width: 100%;
    }
    
    .services {
        padding: 20px 16px;
    }
    
    .service-card {
        padding: 20px;
    }
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: 10;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

/* Accordion Styles */
.accordion {
    padding: 0;
}

.accordion-item {
    border-bottom: 1px solid #e0e0e0;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.accordion-header:hover {
    background-color: #f9f9f9;
}

.accordion-header span:first-child {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.accordion-icon {
    font-size: 24px;
    font-weight: 300;
    color: #4A90E2;
    transition: transform 0.3s ease;
    width: 24px;
    text-align: center;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #fafafa;
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
}

.accordion-content p,
.accordion-content ul {
    padding: 0 24px 20px 24px;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.accordion-content p:first-child {
    padding-top: 20px;
}

.accordion-content ul {
    list-style: none;
    padding-left: 24px;
}

.accordion-content li {
    padding: 4px 0;
    position: relative;
    padding-left: 20px;
}

.accordion-content li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #4A90E2;
    font-weight: bold;
}

.accordion-content strong {
    color: #333;
    font-weight: 600;
}

/* Telegram Web App specific styles */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #fff;
    }
    
    .container {
        background: #1a1a1a;
    }
    
    .header {
        background: #1a1a1a;
        border-bottom-color: #333;
    }
    
    .header-title h1 {
        color: #fff;
    }
    
    .menu-btn {
        color: #fff;
    }
    
    .service-card {
        background: #2a2a2a;
        border-color: #333;
    }
    
    .service-title {
        color: #fff;
    }
    
    .service-description {
        color: #ccc;
    }
    
    .btn-outline {
        background: #2a2a2a;
        color: #4A90E2;
    }

    .modal-content {
        background: #2a2a2a;
    }

    .modal-header {
        background: #2a2a2a;
        border-bottom-color: #333;
    }

    .modal-header h2 {
        color: #fff;
    }

    .modal-close {
        color: #ccc;
    }

    .modal-close:hover {
        color: #fff;
    }

    .accordion-item {
        border-bottom-color: #333;
    }

    .accordion-header:hover {
        background-color: #333;
    }

    .accordion-header span:first-child {
        color: #fff;
    }

    .accordion-content {
        background-color: #1f1f1f;
    }

    .accordion-content p,
    .accordion-content ul {
        color: #ccc;
    }

    .accordion-content strong {
        color: #fff;
    }
}
