/* Admin Panel Styles */

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--text-primary);
    margin-top: 1rem;
    font-size: 1rem;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 2rem;
}

.login-container {
    background: rgba(13, 27, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.logo-small {
    margin: 0 auto 2rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-small {
    position: relative;
    width: 70px;
    height: 70px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 3s ease-in-out infinite;
}

.light-slice-small {
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 6px;
    background: var(--accent);
    border-radius: 3px;
    box-shadow: 0 0 15px var(--accent);
}

.triangle-a-small {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 26px solid var(--accent);
}

.login-container h2 {
    font-family: 'Cinzel', serif;
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-tertiary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-input {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    color: var(--text-tertiary);
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.email-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem 3rem 0.9rem 1.2rem;
    color: var(--text-tertiary);
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 2px;
    width: 100%;
}

.password-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.password-input::placeholder {
    letter-spacing: normal;
}

.toggle-password-btn {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.3rem;
    opacity: 0.5;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.eye-icon {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.toggle-password-btn:hover .eye-icon {
    filter: grayscale(0%);
}

.toggle-password-btn.password-visible .eye-icon {
    opacity: 0.8;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.85rem;
    min-height: 20px;
    margin: 0;
}

.login-btn {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    padding: 0.9rem 1.5rem;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.unlock-icon {
    font-size: 1.2rem;
}

.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--text-primary);
}

/* Admin Panel */
.admin-panel {
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.admin-header {
    background: rgba(13, 27, 42, 0.8);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-title {
    font-family: 'Cinzel', serif;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

.btn-secondary,
.btn-logout {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-logout {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
}

.btn-logout:hover {
    background: #ff6b6b;
    color: white;
}

/* Admin Container */
.admin-container {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

.admin-welcome {
    margin-bottom: 3rem;
    text-align: center;
}

.admin-welcome h1 {
    font-family: 'Cinzel', serif;
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.admin-welcome p {
    color: var(--text-tertiary);
    font-size: 1.1rem;
}

.admin-section {
    background: rgba(13, 27, 42, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    overflow-x: hidden;
    box-sizing: border-box;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-section h2 {
    font-family: 'Cinzel', serif;
    color: var(--text-primary);
    font-size: 1.8rem;
    margin: 0;
}

.btn-add {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    padding: 0.7rem 1.3rem;
    border-radius: 6px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Admin Project Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.admin-project-card {
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.admin-project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.15);
}

.admin-project-card.coming-soon {
    opacity: 0.7;
}

.project-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.project-status.active {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.project-status.coming-soon {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
    border: 1px solid #FFC107;
}

.admin-project-card .project-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.admin-project-card h3 {
    font-family: 'Cinzel', serif;
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.admin-project-card p {
    color: var(--text-tertiary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-meta {
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(117, 117, 117, 0.3);
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    flex-wrap: wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.meta-item a {
    color: #4A90E2;
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
    flex: 1;
    min-width: 0;
}

.meta-item a:hover {
    color: var(--accent);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-icon:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.btn-icon.danger:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Reviews Display */
.reviews-display {
    margin-top: 1rem;
}

.review-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: all 0.3s ease;
}

.review-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.1);
}

.review-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.review-info {
    flex: 1;
}

.review-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    font-weight: 400;
}

.review-value {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    font-family: 'Cinzel', serif;
}

.stat-card {
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info {
    flex: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.stat-value {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Cinzel', serif;
}

/* Admin Footer */
.admin-footer {
    background: rgba(13, 27, 42, 0.8);
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .admin-actions {
        width: 100%;
        justify-content: center;
    }

    .admin-container {
        padding: 2rem 1rem;
    }

    .admin-welcome h1 {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .admin-project-card {
        min-width: 0;
        padding: 1.2rem;
    }
    
    .meta-item {
        font-size: 0.8rem;
    }
    
    .meta-item a {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .admin-section {
        padding: 1.5rem 1rem;
        margin-left: 0;
        margin-right: 0;
    }

    .login-container {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .admin-welcome h1 {
        font-size: 1.6rem;
    }

    .admin-section {
        padding: 1.2rem 0.8rem;
        margin-left: 0;
        margin-right: 0;
    }

    .admin-section h2 {
        font-size: 1.4rem;
    }
    
    .admin-project-card {
        padding: 1rem 0.8rem;
    }
    
    .projects-grid {
        gap: 0.8rem;
    }
    
    .meta-item {
        font-size: 0.75rem;
        gap: 0.4rem;
    }
    
    .meta-item a {
        font-size: 0.7rem;
        line-height: 1.5;
    }
    
    .admin-container {
        padding: 1.5rem 0.8rem;
    }
}

/* ===========================
   PROJECT MODAL STYLES
   =========================== */

.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.project-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.project-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.98) 0%, rgba(27, 38, 59, 0.98) 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(212, 175, 55, 0.1);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.project-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border);
}

.project-modal-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--accent);
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent);
    transform: rotate(90deg);
}

.project-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: rgba(10, 10, 10, 0.7);
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

select.form-input {
    cursor: pointer;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    opacity: 0.7;
}

.form-input.error {
    border-color: #ff6b6b;
    animation: inputShake 0.5s;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    font-family: 'Manrope', sans-serif;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-submit {
    background: linear-gradient(135deg, var(--accent) 0%, #c5a351 100%);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit .btn-icon {
    transition: transform 0.3s ease;
}

.btn-submit:hover .btn-icon {
    transform: scale(1.2) rotate(20deg);
}

/* ===========================
   TOAST NOTIFICATIONS
   =========================== */

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.toast {
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.98) 0%, rgba(27, 38, 59, 0.98) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: all;
    cursor: pointer;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.toast-success {
    border-left: 4px solid #4CAF50;
}

.toast.toast-error {
    border-left: 4px solid #ff6b6b;
}

.toast.toast-info {
    border-left: 4px solid var(--accent);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-message {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.toast.toast-exit {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ===========================
   MODAL RESPONSIVE
   =========================== */

@media (max-width: 768px) {
    .project-modal-content {
        max-width: 100%;
        border-radius: 16px;
        max-height: 85vh;
    }

    .project-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .project-modal-header h2 {
        font-size: 1.5rem;
    }

    .project-form {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .project-modal {
        padding: 0.5rem;
    }

    .project-modal-header {
        padding: 1rem 1rem 0.75rem;
    }

    .project-modal-header h2 {
        font-size: 1.3rem;
    }

    .project-form {
        padding: 1rem;
    }
}

