* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #0a0a0f;
    --card-bg: #1a1a24;
    --input-bg: #0f0f14;
    --input-border: rgba(99, 102, 241, 0.3);
    --input-border-active: #6366f1;
    --text-primary: #ffffff;
    --text-secondary: #b4b4c4;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --delete-color: #ef4444;
    --delete-hover: #f87171;
    --error-color: #f59e0b;
    --success-color: #10b981;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* Login Screen */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.login-container {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-container h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.password-input {
    width: 100%;
    padding: 1rem;
    background: var(--input-bg);
    border: none;
    border-bottom: 2px solid var(--input-border);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.password-input:focus {
    outline: none;
    border-bottom-color: var(--input-border-active);
}

.password-input::placeholder {
    color: var(--text-secondary);
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.login-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-error {
    margin-top: 1rem;
    color: var(--error-color);
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.5rem;
}

/* Settings Screen */
.settings-container {
    max-width: 700px;
    margin: 0 auto;
}

.settings-header {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.settings-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent);
}

.settings-section {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    font-size: 1.25rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.input-field {
    width: 100%;
    padding: 0.875rem;
    background: var(--input-bg);
    border: none;
    border-bottom: 2px solid var(--input-border);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-bottom-color: var(--input-border-active);
}

.input-field::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Color Input */
.color-input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.color-input {
    width: 60px;
    height: 45px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

.color-text-input {
    flex: 1;
}

/* Link Items */
.link-item,
.project-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.link-item:last-child,
.project-item:last-child {
    margin-bottom: 0;
}

.link-label-input,
.project-label-input {
    flex: 0 0 150px;
}

.link-url-input,
.project-desc-input {
    flex: 1;
}

.delete-btn {
    background: var(--delete-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.delete-btn:hover {
    background: var(--delete-hover);
    transform: scale(1.05);
}

.delete-btn:active {
    transform: scale(0.95);
}

.add-link-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-family: inherit;
}

.add-link-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.add-link-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.25rem;
    font-weight: 300;
}

/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.error-icon {
    font-size: 1rem;
}

/* Save Section */
.save-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.save-btn {
    width: 100%;
    padding: 1.25rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-bottom: 1rem;
}

.save-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.save-btn:active {
    transform: translateY(0);
}

.save-message {
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.5rem;
}

.save-message.success {
    color: var(--success-color);
}

.save-message.error {
    color: var(--error-color);
}

/* Responsive */
@media (max-width: 768px) {
    .settings-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .link-item,
    .project-item {
        flex-direction: column;
    }

    .link-label-input,
    .project-label-input {
        flex: 1;
        width: 100%;
    }

    .color-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .color-input {
        width: 100%;
    }
}

