@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #7cf7ff;
    --secondary-color: #7df29b;
    --accent-color: #ffb869;
    --dark-bg: #0b0f19;
    --darker-bg: #080c14;
    --card-bg: rgba(18, 24, 36, 0.8);
    --border-color: rgba(124, 247, 255, 0.18);
    --text-primary: #e6edf5;
    --text-secondary: #9aa9bc;
    --muted-surface: rgba(255, 255, 255, 0.04);
    --danger-color: #ff5c8d;
    --success-color: #6de6a6;
    --shadow-glow: 0 20px 60px rgba(6, 16, 32, 0.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background:
        radial-gradient(circle at 15% 20%, rgba(124, 247, 255, 0.08), transparent 35%),
        radial-gradient(circle at 85% 10%, rgba(255, 184, 105, 0.08), transparent 30%),
        linear-gradient(135deg, #0b0f19 0%, #0a1022 50%, #0b0f19 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Cyber Grid Background */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(124, 247, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 247, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
    opacity: 0.6;
}

@keyframes gridMove {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(50px);
    }
}

/* Login Page Styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a0a1f 50%, #0a0a0f 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.glitch-box {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    padding: 50px 40px;
    position: relative;
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
}

.cyber-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
}

.cyber-corner.tl {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.cyber-corner.tr {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.cyber-corner.bl {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.cyber-corner.br {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.cyber-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    color: var(--primary-color);
    text-shadow:
        0 0 10px var(--primary-color),
        0 0 20px var(--primary-color),
        0 0 30px rgba(0, 255, 255, 0.5);
    margin-bottom: 10px;
    letter-spacing: 5px;
    position: relative;
}

.access-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-color) 50%,
        transparent 100%);
    margin-bottom: 40px;
    box-shadow: 0 0 10px var(--primary-color);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.input-group {
    position: relative;
}

.cyber-label {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.cyber-input {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

.cyber-input:focus {
    border-color: var(--primary-color);
    box-shadow:
        0 0 14px rgba(124, 247, 255, 0.25),
        inset 0 0 10px rgba(124, 247, 255, 0.12);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

.cyber-input:focus + .input-line {
    width: 100%;
}

.cyber-button {
    position: relative;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #041019;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(124, 247, 255, 0.25);
}

.cyber-button:hover {
    box-shadow:
        0 18px 38px rgba(124, 247, 255, 0.28),
        0 10px 26px rgba(125, 242, 155, 0.2);
    transform: translateY(-2px) scale(1.01);
}

.cyber-button:active {
    transform: translateY(0);
}

.cyber-button.ghost {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    box-shadow: inset 0 0 0 1px rgba(124, 247, 255, 0.15);
}

.cyber-button.ghost.active {
    background: linear-gradient(135deg, rgba(124, 247, 255, 0.14), rgba(125, 242, 155, 0.12));
    color: var(--dark-bg);
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-glitch {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
}

.cyber-button:hover .button-glitch {
    left: 100%;
}

.error-message {
    color: var(--danger-color);
    font-size: 0.95rem;
    text-align: center;
    padding: 10px;
    border: 1px solid var(--danger-color);
    background: rgba(255, 92, 141, 0.12);
    display: none;
    animation: slideIn 0.3s ease;
}

.error-message.show {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Portfolio Page Styles */
.portfolio-page {
    background: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.cyber-header {
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(12, 17, 28, 0.82);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.cyber-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 3px;
    position: relative;
}

.cyber-nav {
    display: flex;
    gap: 15px;
}

.cyber-button-small {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    border-radius: 10px;
}

.cyber-button-small:hover {
    background: rgba(124, 247, 255, 0.1);
    color: var(--primary-color);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    padding: 60px 20px;
}

.hero-section {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
}

.title-wrapper {
    position: relative;
}

.main-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    letter-spacing: 1px;
    line-height: 1.15;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.glitch {
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
    96% {
        transform: translate(-2px, -2px);
    }
    98% {
        transform: translate(2px, 2px);
    }
}

.subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* Content Cards */
.content-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.edit-strip {
    margin: 60px 0 20px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, rgba(124, 247, 255, 0.06), rgba(125, 242, 155, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 14px;
    position: sticky;
    bottom: 16px;
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-glow);
}

.edit-strip__copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-strip__title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    color: var(--primary-color);
    text-transform: uppercase;
}

.edit-strip__hint {
    color: var(--text-secondary);
    font-size: 0.98rem;
}

.cyber-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 30px;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 16px;
    box-shadow: var(--shadow-glow);
}

.cyber-card:hover {
    border-color: var(--primary-color);
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
    transform: translateY(-5px);
}

.cyber-card.highlight {
    border-color: var(--accent-color);
    background: rgba(255, 184, 105, 0.06);
}

.cyber-card.highlight:hover {
    border-color: var(--accent-color);
    box-shadow:
        0 0 20px rgba(255, 184, 105, 0.3),
        inset 0 0 20px rgba(255, 184, 105, 0.08);
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.title-bracket {
    color: var(--secondary-color);
    font-size: 1.6rem;
}

.card-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    font-weight: 400;
}

.card-content p {
    margin-bottom: 15px;
}

.card-content p:last-child {
    margin-bottom: 0;
}

.card-content[data-editable] {
    position: relative;
    padding: 18px;
    border-left: 2px solid transparent;
    transition: all 0.25s ease;
    cursor: default;
}

.is-editing .card-content[data-editable] {
    border-left-color: var(--primary-color);
    background: rgba(124, 247, 255, 0.04);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.is-editing .card-content[data-editable]:hover {
    background: rgba(124, 247, 255, 0.06);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid var(--border-color);
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 3px;
}

.close-modal {
    background: none;
    border: none;
    color: var(--danger-color);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.close-modal:hover {
    transform: rotate(90deg);
    text-shadow: 0 0 10px var(--danger-color);
}

.modal-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.cyber-textarea {
    width: 100%;
    min-height: 300px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
}

.cyber-textarea:focus {
    border-color: var(--primary-color);
    box-shadow:
        0 0 12px rgba(124, 247, 255, 0.25),
        inset 0 0 10px rgba(124, 247, 255, 0.12);
}

.modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 30px;
    border-top: 2px solid var(--border-color);
}

.cyber-button-secondary {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.cyber-button-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
        letter-spacing: 3px;
    }

    .cyber-card {
        padding: 20px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .card-content {
        font-size: 1rem;
    }

    .cyber-header .container {
        flex-direction: column;
        gap: 15px;
    }

    .cyber-nav {
        width: 100%;
        justify-content: center;
    }

    .cyber-button-small {
        flex: 1;
    }

    .glitch-box {
        padding: 30px 20px;
    }

    .cyber-title {
        font-size: 2rem;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .edit-strip {
        flex-direction: column;
        align-items: flex-start;
        position: static;
    }

    .edit-strip .cyber-button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(109, 230, 166, 0.15);
    border: 2px solid var(--success-color);
    color: var(--success-color);
    padding: 15px 25px;
    border-radius: 5px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(109, 230, 166, 0.3);
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    z-index: 2000;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}
