/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    /* Основные цвета */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #806b70;
    --gray-light: #e5e7eb;
    --white: #ffffff;

    /* Тени */
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.15);

    /* Скругления */
    --radius: 12px;

    /* Анимации */
    --transition: all 0.3s ease;
}

/* ==========================================================================
   Базовые стили
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
    color: #f9fafb;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 32px;
    color: var(--primary);
}

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: #9ca3af;
    font-size: 18px;
    font-weight: 400;
}

/* ==========================================================================
   Карточки
   ========================================================================== */
.card {
    background: #374151;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: var(--transition);
    border: 1px solid #4b5563;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    margin-bottom: 10px;
    color: #f9fafb;
}

.card h2 i {
    color: var(--primary);
}

.description {
    color: #9ca3af;
    margin-bottom: 25px;
    font-size: 16px;
}

/* ==========================================================================
   Форма
   ========================================================================== */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #f1f5f9;
}

.form-group label i {
    color: var(--primary);
}

/* ==========================================================================
   Textarea и Inputs
   ========================================================================== */
textarea, select, input {
    width: 100%;
    padding: 14px;
    border: 2px solid #4b5563;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    transition: var(--transition);
    background-color: #4b5563;
    color: #f1f5f9;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Плейсхолдер - СВЕТЛЫЙ ДЛЯ ТЕМНОЙ ТЕМЫ */
textarea::placeholder,
input::placeholder {
    color: #94a3b8;
    opacity: 0.8;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
}

textarea:focus,
select:focus,
input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* ==========================================================================
   Счетчик символов
   ========================================================================== */
.char-counter {
    text-align: right;
    font-size: 14px;
    color: #9ca3af;
    margin-top: 5px;
}

.char-counter--warning {
    color: var(--danger);
}

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn-generate {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    padding: 14px 24px;
    background: #374151;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-copy {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 50px;
    position: relative;
    overflow: hidden;
}

.btn-copy:hover {
    background: var(--primary-dark);
}

.btn-copy::after {
    content: '✓';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-weight: bold;
}

.btn-copy.copied::after {
    transform: translateY(0);
}

.btn-copy.copied i {
    opacity: 0;
}

.btn-copy-secret {
    margin-top: 20px;
    padding: 14px 24px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-copy-secret:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

.btn-copy-secret::after {
    content: '✓ Данные скопированы!';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-weight: 600;
}

.btn-copy-secret.copied::after {
    transform: translateY(0);
}

.btn-copy-secret.copied i {
    opacity: 0;
}

.btn-test {
    padding: 14px 24px;
    background: var(--secondary);
    color: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-test:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

/* ==========================================================================
   Результат
   ========================================================================== */
.result-box {
    background: #4b5563;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #6b7280;
}

.url-display {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.url-display input {
    flex: 1;
    padding: 14px;
    border: 2px solid #6b7280;
    border-radius: 8px;
    font-size: 16px;
    background: #374151;
    color: #f1f5f9;
    font-family: 'Courier New', monospace;
}

.info-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #1e3a8a;
    border-radius: 8px;
    color: #93c5fd;
    font-size: 14px;
}

.info-tip i {
    font-size: 18px;
}

.actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Просмотр секрета
   ========================================================================== */
.secret-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.expiry-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 14px;
}

.secret-container {
    position: relative;
    background: #4b5563;
    border-radius: 8px;
    overflow: hidden;
    min-height: 200px;
    margin-bottom: 20px;
    border: 1px solid #6b7280;
}

.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(79, 70, 229, 0.9));
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.blur-overlay:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(79, 70, 229, 0.95));
}

.blur-content {
    text-align: center;
    color: white;
    padding: 30px;
}

.blur-content i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.blur-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.blur-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.click-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.8;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.secret-content {
    padding: 30px;
}

.secret-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.6;
    color: #f1f5f9;
    background: #374151;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #6b7280;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
}

.view-info {
    margin-top: 20px;
}

.warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #78350f;
    border-radius: 8px;
    color: #fbbf24;
    font-size: 14px;
}

.warning i {
    font-size: 20px;
}

/* ==========================================================================
   Уведомления
   ========================================================================== */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    transform: translateX(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    min-width: 280px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification i {
    font-size: 20px;
    animation: pulse 2s infinite;
}

.notification.error {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.notification.warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   Уже просмотрено/Истекло
   ========================================================================== */
.already-viewed-section,
.expired-section {
    max-width: 500px;
    margin: 50px auto;
}

.already-viewed-content {
    text-align: center;
    padding: 40px 30px;
}

.already-viewed-content i {
    font-size: 40px;
    /*margin-bottom: 25px;*/
}

.already-viewed-section .already-viewed-content i {
    color: var(--danger);
    opacity: 0.8;
}

.expired-section .already-viewed-content i {
    color: var(--warning);
    opacity: 0.8;
}

.already-viewed-content h2 {
    font-size: 28px;
    color: #f9fafb;
    margin-bottom: 15px;
}

.already-viewed-content p {
    color: #9ca3af;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.already-viewed-content .btn-secondary {
    margin-top: 20px;
    padding: 14px 32px;
    font-size: 17px;
    background: #374151;
}

/* ==========================================================================
   Футер с соцсетями
   ========================================================================== */
.footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #4b5563;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-info {
    flex: 1;
    min-width: 300px;
}

.footer-info p {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-info .fa-shield-alt {
    color: var(--primary);
}

.footer-note {
    font-size: 13px;
    opacity: 0.7;
    color: #6b7280;
}

.social-links {
    text-align: right;
}

.social-title {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
}

.social-icons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    transition: var(--transition);
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 10px;
}

.social-link:hover::before {
    opacity: 0.1;
}

.social-link i {
    font-size: 24px;
    transition: var(--transition);
}

.social-link .social-text {
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--primary);
}

.social-link:hover i {
    transform: translateY(-3px) scale(1.1);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1.1);
    }
    50% {
        transform: translateY(-5px) scale(1.1);
    }
}

.social-link:hover i {
    animation: float 2s ease-in-out infinite;
}

/* Цвета для соцсетей */
.social-link[href*="quality-lab.ru"]:hover {
    color: #6366f1;
}

.social-link[href*="t.me"]:hover {
    color: #0088cc;
}

.social-link[href*="vk.com"]:hover {
    color: #0077ff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #4b5563;
    color: #9ca3af;
    font-size: 13px;
    opacity: 0.7;
}

/* ==========================================================================
   Адаптивность
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 0 10px;
    }

    .card {
        padding: 20px;
    }

    .url-display {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
    }

    .actions {
        flex-direction: column;
    }

    .notification {
        left: 20px;
        right: 20px;
        bottom: 20px;
        min-width: auto;
    }

    .social-link {
        min-width: 70px;
        padding: 10px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        text-align: center;
        width: 100%;
    }

    .social-icons {
        justify-content: center;
    }

    .logo {
        flex-direction: column;
        gap: 8px;
    }

    .logo h1 {
        font-size: 28px;
    }

    .secret-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .header {
        margin-bottom: 20px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .tagline {
        font-size: 16px;
    }

    .card h2 {
        font-size: 20px;
    }

    .btn-generate {
        padding: 14px;
        font-size: 16px;
    }

    .already-viewed-content i {
        font-size: 48px;
    }

    .already-viewed-content h2 {
        font-size: 24px;
    }

    .already-viewed-content p {
        font-size: 16px;
    }
}

/* ==========================================================================
   Utility
   ========================================================================== */
.hidden {
    display: none !important;
}

/* ==========================================================================
   Анимация загрузки
   ========================================================================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   Selection
   ========================================================================== */
::selection {
    background-color: rgba(99, 102, 241, 0.3);
    color: inherit;
}