/**
 * AI Note Assistant - Основные стили
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4fc3f7;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 8px 16px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #4fc3f7;
}

.auth-btn,
.logout-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
}

.auth-btn {
    background: #0088cc;
}

.auth-btn:hover {
    background: #0099e6;
}

.logout-btn {
    background: #e53935;
}

.logout-btn:hover {
    background: #f44336;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #4fc3f7;
}

.hero p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 20px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #0088cc, #0066aa);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 136, 204, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Section Title */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #4fc3f7;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #4fc3f7;
}

/* Note Item */
.note-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.note-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.note-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.note-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.note-summary {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #81d4fa;
}

.note-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.note-item:hover .note-actions {
    opacity: 1;
}

.note-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.note-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.note-action-btn.delete:hover {
    background: rgba(229, 57, 53, 0.3);
}

.note-content[contenteditable="true"] {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 6px;
    outline: none;
    border: 1px solid rgba(79, 195, 247, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.quick-action-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-action-btn:hover {
    background: rgba(79, 195, 247, 0.2);
    border-color: #4fc3f7;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4fc3f7;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.3rem;
    color: #4fc3f7;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #fff;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #4fc3f7;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Buttons */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4fc3f7, #0088cc);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(79, 195, 247, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.save-btn {
    background: #66bb6a;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 0.9rem;
}

.save-btn:hover {
    background: #81c784;
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    margin-left: 10px;
    font-size: 0.9rem;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Alert */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background: rgba(102, 187, 106, 0.2);
    color: #66bb6a;
    border: 1px solid rgba(102, 187, 106, 0.3);
}

.alert-error {
    background: rgba(229, 57, 53, 0.2);
    color: #e53935;
    border: 1px solid rgba(229, 57, 53, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    header {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #4fc3f7;
}

.login-hint {
    background: rgba(79, 195, 247, 0.1);
    border: 1px solid rgba(79, 195, 247, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.login-hint a {
    color: #4fc3f7;
}

.error {
    background: rgba(229, 57, 53, 0.2);
    color: #e53935;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(229, 57, 53, 0.3);
}

.success {
    background: rgba(102, 187, 106, 0.2);
    color: #66bb6a;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(102, 187, 106, 0.3);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0088cc, #0066aa);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 136, 204, 0.4);
}
