* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
    min-height: 100vh;
    color: #d9f99d;
}

/* Login Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(30, 58, 138, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-title {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(to right, #d9f99d, #bef264);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #d9f99d;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(30, 58, 138, 0.5);
    border-radius: 10px;
    color: #bef264;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #d9f99d;
    box-shadow: 0 0 0 3px rgba(217, 249, 157, 0.2);
}

.error-message {
    color: #f87171;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, #84cc16, #bef264);
    color: #0f172a;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(190, 242, 100, 0.5);
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 58, 138, 0.3);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-title {
    font-size: 24px;
    font-weight: bold;
    color: #d9f99d;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-title:hover {
    color: #fbbf24;
    transform: scale(1.1);
}

.nav-buttons {
    display: flex;
    gap: 16px;
}

.nav-btn {
    padding: 10px 20px;
    color: #d9f99d;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    color: #fbbf24;
    transform: scale(1.1);
}

.btn-logout {
    background: rgba(220, 38, 38, 0.2);
}

.btn-logout:hover {
    background: rgba(220, 38, 38, 0.4);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

/* Card */
.card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(30, 58, 138, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card.hidden {
    display: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    color: #d9f99d;
}

/* Categories */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-btn {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    background: transparent;
    color: #d9f99d;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.category-btn:hover {
    background: rgba(51, 65, 85, 0.5);
    color: #fbbf24;
    transform: scale(1.05);
}

.category-btn.active {
    background: rgba(132, 204, 22, 0.2);
    color: #fbbf24;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(132, 204, 22, 0.3);
}

/* Select */
.macro-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(30, 58, 138, 0.5);
    border-radius: 10px;
    color: #bef264;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.macro-select:focus {
    outline: none;
    border-color: #d9f99d;
    box-shadow: 0 0 0 3px rgba(217, 249, 157, 0.2);
}

/* Macro Content */
.macro-text {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(30, 58, 138, 0.3);
    color: #bef264;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

.copy-success {
    position: absolute;
    top: -40px;
    right: 0;
    background: #84cc16;
    color: #0f172a;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn-icon {
    padding: 8px 12px;
    background: rgba(132, 204, 22, 0.2);
    color: #d9f99d;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    position: relative;
}

.btn-icon:hover {
    background: rgba(132, 204, 22, 0.4);
    color: #fbbf24;
    transform: scale(1.1);
}

/* Manage Macros */
.manage-category {
    margin-bottom: 40px;
}

.manage-category-title {
    font-size: 20px;
    font-weight: bold;
    color: #d9f99d;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.macro-count {
    font-size: 14px;
    color: rgba(217, 249, 157, 0.6);
}

.macro-item {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(30, 58, 138, 0.3);
    margin-bottom: 12px;
    transition: all 0.3s;
}

.macro-item:hover {
    border-color: rgba(217, 249, 157, 0.3);
}

.macro-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.macro-item-info {
    flex: 1;
}

.macro-item-title {
    font-weight: bold;
    color: #d9f99d;
    margin-bottom: 8px;
}

.macro-item-content {
    color: rgba(190, 242, 100, 0.7);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.macro-item-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.btn-edit {
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.2);
    color: #d9f99d;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.4);
    color: #fbbf24;
    transform: scale(1.1);
}

.btn-delete {
    padding: 8px 12px;
    background: rgba(220, 38, 38, 0.2);
    color: #d9f99d;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: rgba(220, 38, 38, 0.4);
    color: #fbbf24;
    transform: scale(1.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border: 1px solid rgba(30, 58, 138, 0.3);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    color: #d9f99d;
    margin-bottom: 20px;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(30, 58, 138, 0.5);
    border-radius: 10px;
    color: #bef264;
    font-size: 16px;
    margin-bottom: 16px;
    transition: all 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: #d9f99d;
}

.textarea-field {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(30, 58, 138, 0.5);
    border-radius: 10px;
    color: #bef264;
    font-size: 16px;
    min-height: 200px;
    margin-bottom: 20px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
}

.textarea-field:focus {
    outline: none;
    border-color: #d9f99d;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.btn-save {
    flex: 1;
    padding: 12px;
    background: rgba(132, 204, 22, 0.2);
    color: #d9f99d;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-save:hover {
    background: rgba(132, 204, 22, 0.4);
    color: #fbbf24;
    transform: scale(1.05);
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    background: rgba(220, 38, 38, 0.2);
    color: #d9f99d;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background: rgba(220, 38, 38, 0.4);
    color: #fbbf24;
    transform: scale(1.05);
}

.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(132, 204, 22, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(132, 204, 22, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .navbar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
}