/* ==========================================
   TERMINAL EMULATOR STYLES
   ========================================== */

/* Header Terminal Button */
.header-terminal-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 6px;
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.header-terminal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.2), transparent);
    transition: left 0.5s;
}

.header-terminal-btn:hover::before {
    left: 100%;
}

.header-terminal-btn:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--primary-color);
    box-shadow:
        0 0 15px rgba(0, 243, 255, 0.3),
        inset 0 0 10px rgba(0, 243, 255, 0.1);
    transform: translateY(-2px);
}

.header-terminal-btn i {
    font-size: 0.9rem;
    animation: terminalIconPulse 2s ease-in-out infinite;
}

.header-terminal-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

@keyframes terminalIconPulse {

    0%,
    100% {
        text-shadow: 0 0 5px var(--primary-color);
        opacity: 0.8;
    }

    50% {
        text-shadow: 0 0 15px var(--primary-color), 0 0 25px var(--primary-color);
        opacity: 1;
    }
}

/* Terminal Overlay */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.terminal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Interactive Terminal Container */
.interactive-terminal {
    width: 90%;
    max-width: 800px;
    height: 500px;
    background: rgba(13, 14, 21, 0.98);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 40px rgba(0, 243, 255, 0.3),
        0 0 100px rgba(0, 243, 255, 0.1),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.terminal-overlay.active .interactive-terminal {
    transform: scale(1) translateY(0);
}

.interactive-terminal.maximized {
    width: 100%;
    max-width: 100%;
    height: 100%;
    border-radius: 0;
}

/* Desktop draggable & resizable */
@media (min-width: 769px) {
    .interactive-terminal.draggable {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .interactive-terminal.draggable .terminal-header {
        cursor: move;
    }

    .interactive-terminal .resize-handle.br {
        position: absolute;
        right: 8px;
        bottom: 8px;
        width: 14px;
        height: 14px;
        border: 1px solid rgba(0, 243, 255, 0.4);
        background: rgba(0, 243, 255, 0.15);
        border-radius: 3px;
        cursor: se-resize;
        box-shadow: 0 0 8px rgba(0, 243, 255, 0.2);
    }
}

/* Terminal Themes */
.interactive-terminal.terminal-theme-dark {
    background: rgba(13, 14, 21, 0.98);
    border-color: var(--primary-color);
}

.interactive-terminal.terminal-theme-light {
    background: #f7f8fa;
    border-color: #d0d7de;
    color: #111;
}

.interactive-terminal.terminal-theme-light .terminal-header {
    background: #eef2f5;
    border-bottom: 1px solid #d0d7de;
}

.interactive-terminal.terminal-theme-light .terminal-line.command {
    color: #111;
}

.interactive-terminal.terminal-theme-light .terminal-line.result {
    color: #333;
    border-left-color: rgba(0, 0, 0, 0.15);
}

.interactive-terminal.terminal-theme-light .prompt-user {
    color: #2f855a;
}

.interactive-terminal.terminal-theme-light .prompt-host {
    color: #0366d6;
}

.interactive-terminal.terminal-theme-light .terminal-input {
    color: #111;
}

.interactive-terminal.terminal-theme-high-contrast {
    background: #000;
    border-color: #fff;
    color: #fff;
}

.interactive-terminal.terminal-theme-high-contrast .terminal-header {
    background: #000;
    border-bottom: 1px solid #fff;
}

.interactive-terminal.terminal-theme-high-contrast .terminal-line.command,
.interactive-terminal.terminal-theme-high-contrast .terminal-line.result,
.interactive-terminal.terminal-theme-high-contrast .terminal-info,
.interactive-terminal.terminal-theme-high-contrast .terminal-hint,
.interactive-terminal.terminal-theme-high-contrast .ascii-art,
.interactive-terminal.terminal-theme-high-contrast .terminal-output,
.interactive-terminal.terminal-theme-high-contrast .terminal-prompt,
.interactive-terminal.terminal-theme-high-contrast .terminal-input {
    color: #fff;
}

.interactive-terminal.terminal-theme-high-contrast .terminal-line.result {
    border-left-color: #fff;
}

/* Interactive Terminal Header */
.interactive-terminal .terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0;
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.terminal-controls .dot {
    cursor: pointer;
    transition: transform 0.2s;
}

.terminal-controls .dot:hover {
    transform: scale(1.2);
}

.terminal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.terminal-title i {
    color: var(--primary-color);
}

.terminal-actions .terminal-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.terminal-actions .terminal-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    color: var(--accent-red);
}

/* Terminal Body */
.terminal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow: hidden;
}

/* Terminal Output */
.terminal-output {
    flex: 1;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    padding-right: 10px;
}

.terminal-output::-webkit-scrollbar {
    width: 6px;
}

.terminal-output::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.terminal-output::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.terminal-line {
    margin-bottom: 4px;
    word-wrap: break-word;
}

.terminal-line.welcome {
    color: var(--primary-color);
    margin-bottom: 16px;
}

.terminal-line.command {
    color: var(--text-primary);
}

.terminal-line.result {
    color: var(--text-secondary);
    padding-left: 10px;
    border-left: 2px solid rgba(0, 243, 255, 0.3);
    margin-left: 5px;
}

.terminal-info {
    color: var(--accent-green);
}

.terminal-hint {
    color: var(--text-secondary);
    font-style: italic;
}

.ascii-art {
    color: var(--primary-color);
    font-size: 0.65rem;
    line-height: 1.2;
    white-space: pre;
    display: block;
}

/* Terminal Input Line */
.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.terminal-prompt {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    white-space: nowrap;
}

.prompt-user {
    color: var(--accent-green);
}

.prompt-host {
    color: var(--primary-color);
}

.prompt-path {
    color: #9b59b6;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    outline: none;
    caret-color: var(--primary-color);
}

.terminal-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Neofetch Styles */
.neofetch-logo {
    color: var(--primary-color);
    font-size: 0.55rem;
    line-height: 1.1;
}

.neofetch-info {
    color: var(--text-secondary);
}

.neofetch-label {
    color: var(--primary-color);
    font-weight: bold;
}

.neofetch-value {
    color: var(--accent-green);
}

/* ==========================================
   3D TECH STACK VISUALIZATION
   ========================================== */

.tech-universe-section {
    position: relative;
    padding: 2rem 0;
    margin: 2rem 0;
}

.tech-universe-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.tech-orbit-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.award-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.award-center img {
    width: 90%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(241, 196, 15, 0.5));
    animation: awardShine 3.5s ease-in-out infinite;
}

@keyframes awardShine {
        0%, 100% {
        filter: drop-shadow(rgb(235 239 239 / 40%) 0px 0px 10px);
    }

    50% {
        filter: drop-shadow(rgb(250 255 253) 0px 0px 18px);
    }
}

.tech-orbit {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px dashed rgba(0, 243, 255, 0.2);
    transform-style: preserve-3d;
    animation: orbitRotate 20s linear infinite;
}

.tech-orbit::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.15), 0 0 40px rgba(0, 243, 255, 0.05);
    animation: orbitGlow 6s ease-in-out infinite;
}

.tech-orbit.orbit-1 {
    transform: rotateX(70deg);
}

.tech-orbit.orbit-2 {
    transform: rotateX(70deg) rotateZ(60deg);
    animation-duration: 25s;
    animation-direction: reverse;
}

.tech-orbit.orbit-3 {
    transform: rotateX(70deg) rotateZ(120deg);
    animation-duration: 30s;
}

.tech-orbit.orbit-4 {
    width: 130%;
    height: 130%;
    left: -15%;
    top: -15%;
    transform: rotateX(70deg) rotateZ(180deg);
    animation-duration: 35s;
}

.tech-orbit.orbit-5 {
    width: 150%;
    height: 150%;
    left: -25%;
    top: -25%;
    transform: rotateX(70deg) rotateZ(240deg);
    animation-duration: 40s;
    animation-direction: reverse;
}

@keyframes orbitRotate {
    from {
        transform: rotateX(70deg) rotateZ(0deg);
    }

    to {
        transform: rotateX(70deg) rotateZ(360deg);
    }
}

.tech-orbit.orbit-2 {
    animation-name: orbitRotate2;
}

@keyframes orbitRotate2 {
    from {
        transform: rotateX(70deg) rotateZ(60deg);
    }

    to {
        transform: rotateX(70deg) rotateZ(-300deg);
    }
}

.tech-orbit.orbit-3 {
    animation-name: orbitRotate3;
}

@keyframes orbitRotate3 {
    from {
        transform: rotateX(70deg) rotateZ(120deg);
    }

    to {
        transform: rotateX(70deg) rotateZ(480deg);
    }
}

@keyframes orbitGlow {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.7; }
}

.tech-planet {
    position: absolute;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 14, 21, 0.9);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--text-secondary);
    transform-style: preserve-3d;
    animation: planetCounter 20s linear infinite, planetGlow 3s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.tech-planet::before {
    content: '';
    position: absolute;
    width: 70%;
    height: 70%;
    border: 1px dashed rgba(0, 243, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1.3);
    left: 50%;
    top: 50%;
    animation: miniOrbit 4s linear infinite;
}

/* Award planet */
.tech-planet.award {
    width: 64px;
    height: 64px;
    padding: 4px;
    border-color: rgba(241, 196, 15, 0.45);
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.28);
    background: rgba(13, 14, 21, 0.85);
    overflow: hidden;
    animation: planetCounter 22s linear infinite;
}

.tech-planet.award img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(241, 196, 15, 0.6));
    transform: rotateX(-70deg) scale(0.95);
}

.tech-planet.award:hover {
    border-color: #f1c40f;
    color: #f1c40f;
    box-shadow: 0 0 35px rgba(241, 196, 15, 0.6), 0 0 70px rgba(241, 196, 15, 0.25);
}

.tech-planet.award::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: radial-gradient(circle, rgba(241, 196, 15, 0.2) 0%, transparent 60%);
    z-index: -1;
    animation: haloPulse 3.5s ease-in-out infinite;
    border-radius: 50%;
}


@keyframes haloPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.tech-planet:hover {
    transform: scale(1.3) !important;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow:
        0 0 30px rgba(0, 243, 255, 0.5),
        0 0 60px rgba(0, 243, 255, 0.2);
    z-index: 100;
}

.tech-planet::after {
    content: attr(data-name);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%) rotateX(-70deg);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--primary-color);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.tech-planet:hover::after {
    opacity: 1;
}

@keyframes planetGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(0, 243, 255, 0.2); border-color: rgba(0, 243, 255, 0.3); }
    50% { box-shadow: 0 0 28px rgba(0, 243, 255, 0.5); border-color: rgba(0, 243, 255, 0.6); }
}

@keyframes miniOrbit {
    0% { transform: translate(-50%, -50%) scale(1.3) rotate(0deg); }
    100% { transform: translate(-50%, -50%) scale(1.3) rotate(360deg); }
}

/* Planet positions on orbit */
.tech-orbit .tech-planet:nth-child(1) {
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
}

.tech-orbit .tech-planet:nth-child(2) {
    left: 100%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.tech-orbit .tech-planet:nth-child(3) {
    left: 50%;
    top: 100%;
    transform: translate(-50%, -50%);
}

.tech-orbit .tech-planet:nth-child(4) {
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes planetCounter {
    from {
        transform: translate(-50%, -50%) rotateZ(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotateZ(-360deg);
    }
}

/* Central Sun */
.tech-sun {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 10;
}

.tech-sun.award-core {
    background: radial-gradient(circle, rgba(241, 196, 15, 0.25) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(241, 196, 15, 0.2);
    animation: sunPulseGold 3.2s ease-in-out infinite;
}

.tech-sun i {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 30px var(--primary-color);
    animation: sunPulse 3s ease-in-out infinite;
}

@keyframes sunPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes sunPulseGold {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

/* Glowing particles around tech universe */
.tech-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
    animation: particleFloat 5s ease-in-out infinite;
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-20px) scale(1.5);
        opacity: 1;
    }
}



/* ==========================================
   PWA INSTALL PROMPT
   ========================================== */

.pwa-install-prompt {
    position: fixed;
    bottom: 100px;
    left: 30px;
    background: rgba(13, 14, 21, 0.98);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 16px 20px;
    z-index: 998;
    display: none;
    flex-direction: column;
    gap: 12px;
    max-width: 280px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
    animation: slideUp 0.3s ease;
}

.pwa-install-prompt.show {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwa-prompt-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-prompt-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.pwa-prompt-title {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.pwa-prompt-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.pwa-prompt-actions {
    display: flex;
    gap: 8px;
}

.pwa-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-btn.install {
    background: var(--primary-color);
    color: #000;
}

.pwa-btn.install:hover {
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

.pwa-btn.dismiss {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.pwa-btn.dismiss:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

@media (max-width: 768px) {
    .header-terminal-btn {
        padding: 6px 10px;
        margin-right: 12px;
    }

    .header-terminal-text {
        display: none;
    }

    .interactive-terminal {
        width: 95%;
        height: 70%;
        max-height: 500px;
    }

    .terminal-output {
        font-size: 0.75rem;
    }

    .ascii-art {
        font-size: 0.4rem;
    }

    .tech-orbit-container {
        width: 250px;
        height: 250px;
    }

    .tech-planet {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .tech-sun {
        width: 60px;
        height: 60px;
    }

    .tech-sun i {
        font-size: 2rem;
    }

    .pwa-install-prompt {
        left: 10px;
        right: 10px;
        bottom: 80px;
        max-width: none;
    }
}

/* Hide elements on very small screens */
@media (max-width: 480px) {
    .ascii-art {
        display: none;
    }

    .tech-universe-section {
        display: none;
    }
}
