/* ===== КРОССБРАУЗЕРНЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== ОБЩИЕ СТИЛИ ===== */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8edf5 100%);
    min-height: 100vh;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    padding: 30px;
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    -webkit-box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 850px;
    width: 100%;
    margin: 0 auto;
}

/* ===== ДЕВИЗ ===== */
.slogan {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #6C5CE7;
    margin-bottom: 25px;
    font-style: italic;
    letter-spacing: 1px;
}

h1 {
    text-align: center;
    color: #2d3436;
    margin-bottom: 5px;
    font-size: 34px;
    font-weight: 700;
}

h2 {
    margin-top: 30px;
    margin-bottom: 20px;
    color: #2d3436;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    font-weight: 600;
}

h3 {
    margin-bottom: 10px;
    color: #2d3436;
    font-weight: 600;
}

/* ===== ТАБЫ ===== */
.tabs {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    border-radius: 10px 10px 0 0;
    -webkit-border-radius: 10px 10px 0 0;
    -moz-border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.tab {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    background: #f8f9fa;
    border: none;
    font-size: 16px;
    font-weight: bold;
    color: #999;
    -webkit-transition: 0.3s;
    transition: 0.3s;
    font-family: inherit;
}

.tab:hover {
    background: #e9ecef;
}

.tab.active {
    color: #6C5CE7;
    background: #ffffff;
    border-bottom: 3px solid #6C5CE7;
}

/* ===== ФОРМЫ ===== */
.form {
    display: none;
}

.form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    font-size: 16px;
    -webkit-transition: 0.3s;
    transition: 0.3s;
    background: #fafafa;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #6C5CE7;
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
    -webkit-box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
    -moz-box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

/* ===== КНОПКИ ===== */
.btn {
    width: 100%;
    padding: 14px;
    background: -webkit-gradient(linear, left top, right top, from(#6C5CE7), to(#a29bfe));
    background: -webkit-linear-gradient(left, #6C5CE7, #a29bfe);
    background: -o-linear-gradient(left, #6C5CE7, #a29bfe);
    background: linear-gradient(90deg, #6C5CE7, #a29bfe);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    -webkit-transition: 0.3s;
    transition: 0.3s;
    font-family: inherit;
}

.btn:hover {
    -webkit-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(108, 92, 231, 0.4);
    -webkit-box-shadow: 0 6px 25px rgba(108, 92, 231, 0.4);
    -moz-box-shadow: 0 6px 25px rgba(108, 92, 231, 0.4);
}

.btn-small {
    display: inline-block;
    padding: 8px 20px;
    background: #dc3545;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    -webkit-transition: 0.3s;
    transition: 0.3s;
    font-family: inherit;
}

.btn-small:hover {
    background: #c82333;
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
}

.btn-ok {
    background: #28a745;
    color: #ffffff;
    padding: 8px 18px;
    text-decoration: none;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    display: inline-block;
    margin-right: 5px;
    -webkit-transition: 0.3s;
    transition: 0.3s;
    font-family: inherit;
    border: none;
    cursor: pointer;
}

.btn-ok:hover {
    background: #218838;
}

.btn-no {
    background: #dc3545;
    color: #ffffff;
    padding: 8px 18px;
    text-decoration: none;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    display: inline-block;
    -webkit-transition: 0.3s;
    transition: 0.3s;
    font-family: inherit;
    border: none;
    cursor: pointer;
}

.btn-no:hover {
    background: #c82333;
}

/* ===== СООБЩЕНИЯ ===== */
.error {
    background: #ffe0e0;
    color: #d32f2f;
    padding: 12px 18px;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #d32f2f;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 12px 18px;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.warning {
    background: #fff3cd;
    color: #856404;
    padding: 12px 18px;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #ffc107;
}

.info-text {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 15px;
}

/* ===== ИНФОРМАЦИЯ О ПОЛЬЗОВАТЕЛЕ ===== */
.user-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid #6C5CE7;
}

.user-info p {
    margin: 5px 0;
}

/* ===== СТАТЬИ ===== */
.post {
    background: #fafafa;
    padding: 20px;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    -webkit-transition: 0.3s;
    transition: 0.3s;
}

.post:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    -webkit-box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    -moz-box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.post-content {
    color: #444;
    line-height: 1.6;
    margin: 10px 0;
}

.post-footer {
    color: #888;
    font-size: 13px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.badge-paid {
    background: #6C5CE7;
    color: #ffffff;
    padding: 2px 12px;
    border-radius: 20px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    font-size: 12px;
    font-weight: normal;
    display: inline-block;
}

.badge-free {
    background: #28a745;
    color: #ffffff;
    padding: 2px 12px;
    border-radius: 20px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    font-size: 12px;
    font-weight: normal;
    display: inline-block;
}

/* ===== QR-КОД ===== */
.qr-container {
    text-align: center;
    border: 2px dashed #ccc;
    padding: 30px;
    border-radius: 15px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    margin: 20px 0;
    background: #fafafa;
}

.qr-placeholder {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    margin: 20px 0;
    display: inline-block;
}

.qr-placeholder img {
    max-width: 200px;
    max-height: 200px;
    height: auto;
    width: auto;
}

.order-id {
    font-family: 'Courier New', monospace;
    background: #f0f0f0;
    padding: 5px 15px;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    font-size: 18px;
    letter-spacing: 1px;
}

/* ===== СТАТИСТИКА (админка) ===== */
.stats {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 20px;
    margin: 20px 0;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.stat-box {
    background: #f8f9fa;
    padding: 15px 25px;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    text-align: center;
    min-width: 100px;
}

.stat-box .number {
    font-size: 28px;
    font-weight: bold;
    color: #6C5CE7;
}

.stat-box .label {
    color: #666;
    margin-top: 5px;
    font-size: 14px;
}

/* ===== ТАБЛИЦЫ (админка) ===== */
table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 15px 0;
    font-size: 14px;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f2f2f2;
    font-weight: bold;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

tr:hover {
    background: #f0f0f0;
}

hr {
    margin: 30px 0;
    border: none;
    border-top: 2px solid #f0f0f0;
}

/* ===== АДАПТИВ ДЛЯ ПЛАНШЕТОВ ===== */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 26px;
    }
    
    .slogan {
        font-size: 15px;
    }
    
    .stats {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 6px 8px;
    }
    
    .tab {
        font-size: 14px;
        padding: 10px;
    }
}

/* ===== АДАПТИВ ДЛЯ ТЕЛЕФОНОВ ===== */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    .slogan {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .btn {
        font-size: 16px;
        padding: 12px;
    }
    
    input[type="email"],
    input[type="password"] {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .tabs {
        margin-bottom: 20px;
    }
    
    .tab {
        font-size: 13px;
        padding: 8px;
    }
    
    .qr-placeholder img {
        max-width: 150px;
        max-height: 150px;
    }
}

/* ===== ПОДДЕРЖКА DARK THEME (опционально) ===== */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .container {
        background: #1e1e2f;
        box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    }
    
    h1, h2, h3 {
        color: #e8e8e8;
    }
    
    .slogan {
        color: #a29bfe;
    }
    
    .tab {
        background: #2a2a3f;
        color: #888;
    }
    
    .tab.active {
        background: #1e1e2f;
        color: #a29bfe;
        border-bottom-color: #a29bfe;
    }
    
    input[type="email"],
    input[type="password"] {
        background: #2a2a3f;
        border-color: #444;
        color: #e8e8e8;
    }
    
    input[type="email"]:focus,
    input[type="password"]:focus {
        background: #333;
        border-color: #a29bfe;
    }
    
    .user-info {
        background: #2a2a3f;
    }
    
    .post {
        background: #2a2a3f;
        border-color: #444;
    }
    
    .post-content {
        color: #ccc;
    }
    
    .stat-box {
        background: #2a2a3f;
    }
    
    .stat-box .label {
        color: #aaa;
    }
    
    table {
        color: #ccc;
    }
    
    th {
        background: #333;
    }
    
    td {
        border-color: #444;
    }
    
    tr:nth-child(even) {
        background: #2a2a3f;
    }
    
    tr:hover {
        background: #333;
    }
    
    .qr-container {
        background: #2a2a3f;
        border-color: #555;
    }
    
    .order-id {
        background: #333;
        color: #e8e8e8;
    }
    
    .info-text {
        color: #aaa;
    }
    
    .badge-paid {
        background: #6C5CE7;
    }
    
    .badge-free {
        background: #28a745;
    }
}