/* ============================================
   ПК-стили (только для экранов шире 768px)
   ============================================ */

@media only screen and (min-width: 769px) {
    /* Скрываем мобильные элементы на ПК */
    .desktop-hidden {
        display: none !important;
    }

    /* Показываем ПК-элементы */
    .desktop-only {
        display: block !important;
    }

    body {
        background: linear-gradient(135deg, #f0f2f5 0%, #e8ecf1 100%);
        min-height: 100vh;
        padding-top: 0;
        margin: 0;
    }

    /* Шапка */
    header {
        background: linear-gradient(135deg, #6c5ce7 0%, #00cec9 100%);
        padding: 16px 40px;
        box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
        position: relative;
        z-index: 10;
    }

    header h1 {
        font-size: 28px;
        color: white;
        margin: 0;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
        letter-spacing: 1px;
        font-weight: 700;
    }

    /* Контейнер с сайдбаром и контентом */
    .desktop-container {
        display: flex;
        max-width: 1280px;
        margin: 30px auto;
        padding: 0 24px;
        gap: 32px;
        min-height: calc(100vh - 180px);
    }

    /* Сайдбар */
    .sidebar {
        flex: 0 0 240px;
        position: sticky;
        top: 30px;
        align-self: flex-start;
        background: white;
        border-radius: 16px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        border: 1px solid rgba(108, 92, 231, 0.06);
        padding: 12px 0;
    }

    .sidebar-menu {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .sidebar-menu-item {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 20px;
        color: #2d3436;
        text-decoration: none;
        font-weight: 500;
        font-size: 15px;
        transition: all 0.2s ease;
        border-left: 3px solid transparent;
        border-radius: 0 8px 8px 0;
    }

    .sidebar-menu-item i {
        width: 22px;
        font-size: 18px;
        color: #6c5ce7;
        text-align: center;
        transition: all 0.2s ease;
    }

    .sidebar-menu-item:hover {
        background: rgba(108, 92, 231, 0.06);
        border-left-color: #6c5ce7;
        color: #6c5ce7;
    }

    .sidebar-menu-item:hover i {
        transform: scale(1.1);
    }

    .sidebar-menu-item span {
        flex: 1;
    }

    /* Основной контент */
    .main-content {
        flex: 1;
        min-width: 0;
    }

    .portfolio-container {
        background: white;
        border-radius: 16px;
        padding: 40px 44px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
        border: 1px solid rgba(108, 92, 231, 0.04);
    }

    /* Герой-секция */
    .hero-section {
        text-align: center;
        padding: 20px 0 30px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        margin-bottom: 30px;
    }

    .hero-section h2 {
        font-size: 36px;
        font-weight: 700;
        color: #2d3436;
        margin: 0 0 12px 0;
        background: linear-gradient(135deg, #6c5ce7, #00cec9);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .hero-subtitle {
        font-size: 18px;
        color: #636e72;
        margin: 0 0 28px 0;
        -webkit-text-fill-color: #636e72;
    }

    /* Кнопки */
    .guest-buttons {
        display: flex;
        justify-content: center;
        gap: 16px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 40px;
        border-radius: 50px;
        font-weight: 600;
        font-size: 16px;
        border: none;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: inline-flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
    }

    .btn-primary {
        background: linear-gradient(135deg, #6c5ce7, #00cec9);
        color: white;
        box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(108, 92, 231, 0.4);
    }

    .btn-secondary {
        background: white;
        color: #6c5ce7;
        border: 2px solid #6c5ce7;
    }

    .btn-secondary:hover {
        background: #6c5ce7;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(108, 92, 231, 0.25);
    }

    /* Сетка функций */
    .features-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .feature-card {
        background: #f8f9fa;
        border-radius: 12px;
        padding: 24px 20px;
        text-align: center;
        transition: all 0.3s ease;
        border: 1px solid transparent;
    }

    .feature-card:hover {
        transform: translateY(-4px);
        border-color: rgba(108, 92, 231, 0.15);
        box-shadow: 0 8px 25px rgba(108, 92, 231, 0.08);
    }

    .feature-icon {
        width: 56px;
        height: 56px;
        background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 206, 201, 0.1));
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 14px;
        font-size: 24px;
        color: #6c5ce7;
        transition: all 0.3s ease;
    }

    .feature-card:hover .feature-icon {
        background: linear-gradient(135deg, #6c5ce7, #00cec9);
        color: white;
        transform: scale(1.05);
    }

    .feature-card h3 {
        font-size: 16px;
        font-weight: 600;
        color: #2d3436;
        margin: 0 0 8px 0;
    }

    .feature-card p {
        font-size: 14px;
        color: #636e72;
        margin: 0;
        line-height: 1.5;
        -webkit-text-fill-color: #636e72;
    }

    /* Модальные окна */
    .modal-content {
        max-width: 440px;
        border-radius: 20px;
        overflow: hidden;
        border: none;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
        animation: modalSlideIn 0.3s ease;
    }

    @keyframes modalSlideIn {
        from {
            opacity: 0;
            transform: translateY(-30px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .modal-header {
        background: linear-gradient(135deg, #6c5ce7, #00cec9);
        padding: 28px 32px 24px;
        color: white;
    }

    .modal-header h3 {
        font-size: 24px;
        font-weight: 700;
        margin: 0 0 6px 0;
    }

    .modal-subtitle {
        font-size: 14px;
        opacity: 0.85;
        margin: 0;
        -webkit-text-fill-color: rgba(255, 255, 255, 0.85);
    }

    .modal-login form,
    .modal-forgot form {
        padding: 28px 32px 32px;
        background: white;
    }

    .close {
        position: absolute;
        top: 16px;
        right: 20px;
        font-size: 28px;
        color: rgba(255, 255, 255, 0.7);
        cursor: pointer;
        transition: all 0.2s ease;
        z-index: 5;
    }

    .close:hover {
        color: white;
        transform: rotate(90deg);
    }

    .modal-content {
        position: relative;
    }

    /* Форма в модалке */
    .modal-login .form-group,
    .modal-forgot .form-group {
        margin-bottom: 18px;
    }

    .modal-login .form-group label,
    .modal-forgot .form-group label {
        font-weight: 600;
        font-size: 14px;
        color: #2d3436;
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .modal-login .form-group label i,
    .modal-forgot .form-group label i {
        color: #6c5ce7;
        font-size: 14px;
    }

    .modal-login .form-group input,
    .modal-forgot .form-group input {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid #e9ecef;
        border-radius: 10px;
        font-size: 15px;
        transition: all 0.2s ease;
        background: #f8f9fa;
        box-sizing: border-box;
    }

    .modal-login .form-group input:focus,
    .modal-forgot .form-group input:focus {
        border-color: #6c5ce7;
        outline: none;
        background: white;
        box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
    }

    /* Чекбокс "Запомнить меня" */
    .remember-me-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 16px 0 20px;
        padding: 8px 0;
    }

    .checkbox-wrapper {
        display: flex;
        align-items: center;
    }

    .custom-checkbox {
        position: absolute;
        opacity: 0;
    }

    .custom-checkbox + .remember-me-label {
        display: flex;
        align-items: center;
        cursor: pointer;
        font-size: 14px;
        color: #2d3436;
    }

    .checkbox-icon {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 2px solid #ced4da;
        border-radius: 6px;
        margin-right: 10px;
        position: relative;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    .custom-checkbox:checked + .remember-me-label .checkbox-icon {
        background: #6c5ce7;
        border-color: #6c5ce7;
    }

    .custom-checkbox:checked + .remember-me-label .checkbox-icon::after {
        content: '✓';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 14px;
        font-weight: 700;
    }

    .remember-me-hint {
        font-size: 12px;
        color: #868e96;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .remember-me-hint i {
        font-size: 12px;
    }

    /* Кнопка отправки */
    .btn-submit {
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, #6c5ce7, #00cec9);
        color: white;
        border: none;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 20px rgba(108, 92, 231, 0.25);
        margin-top: 4px;
    }

    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(108, 92, 231, 0.35);
    }

    .btn-submit:active {
        transform: scale(0.98);
    }

    /* Ссылка "Забыли пароль?" */
    .forgot-password-link {
        display: block;
        text-align: center;
        margin-top: 16px;
        color: #6c5ce7;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s ease;
        font-weight: 500;
        text-decoration: none;
    }

    .forgot-password-link:hover {
        color: #00cec9;
        text-decoration: underline;
    }

    /* Сообщения */
    .message {
        padding: 12px 20px;
        border-radius: 10px;
        margin: 0 32px 10px 32px;
        font-size: 14px;
        display: none;
    }

    .message.error {
        background: #fee2e2;
        color: #dc2626;
        border-left: 4px solid #dc2626;
        display: block !important;
    }

    .message.success {
        background: #d1fae5;
        color: #059669;
        border-left: 4px solid #059669;
        display: block !important;
    }

    /* Футер */
    .footer {
        max-width: 1280px;
        margin: 0 auto 24px;
        padding: 0 24px;
    }

    .footer-content {
        background: white;
        border-radius: 12px;
        padding: 16px 28px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 14px;
        color: #636e72;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
        border: 1px solid rgba(108, 92, 231, 0.04);
    }

    .footer-link {
        color: #6c5ce7;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.2s ease;
    }

    .footer-link:hover {
        color: #00cec9;
        text-decoration: underline;
    }

    .footer-made {
        opacity: 0.7;
        font-size: 13px;
    }
}

/* ============================================
   Адаптация для планшетов (768px - 1024px)
   ============================================ */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    .desktop-container {
        padding: 0 20px;
        gap: 24px;
    }

    .sidebar {
        flex: 0 0 200px;
    }

    .portfolio-container {
        padding: 28px 30px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-section h2 {
        font-size: 28px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 28px;
        font-size: 14px;
    }
}