/* Remeditech Systems Aesthetic Design System */

:root {
    --primary: #00e5ff;
    --primary-dark: #008ba3;
    --primary-glow: rgba(0, 229, 255, 0.3);
    --bg-dark: #07070a;
    --bg-card: rgba(16, 16, 24, 0.75);
    --bg-terminal: rgba(5, 5, 8, 0.85);
    --text-main: #f0f0f5;
    --text-muted: #8e8ea8;
    --border-color: rgba(0, 229, 255, 0.15);
    --border-focus: rgba(0, 229, 255, 0.6);
    
    --success: #00e676;
    --success-glow: rgba(0, 230, 118, 0.25);
    --warning: #ff9100;
    --warning-glow: rgba(255, 145, 0, 0.2);
    --danger: #ff3d00;
    --danger-glow: rgba(255, 61, 0, 0.25);
}

/* Reset and Core Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

/* Cyber Grid Background */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(0, 229, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 229, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -3;
    pointer-events: none;
}

/* Scanlines Overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.12) 50%);
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.4;
}

/* Ambient glow spots */
.ambient-glow {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.07) 0%, rgba(7, 7, 10, 0) 70%);
    z-index: -2;
    pointer-events: none;
}

.ambient-glow.right {
    top: 50%;
    right: -20%;
    left: auto;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(0, 139, 163, 0.05) 0%, rgba(7, 7, 10, 0) 70%);
}

/* Remeditech Layout Container */
.cyber-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 10;
}

/* Futuristic Header */
.cyber-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    position: relative;
}

.cyber-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2.2rem;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    animation: rotateSlow 20s linear infinite;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.cyber-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    line-height: 1.1;
}

.cyber-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* System status indicator */
.system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
    animation: pulse 1.5s infinite;
}

.status-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: var(--primary);
    letter-spacing: 1px;
}

/* Content Box Glassmorphic Panel */
.content-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
}

/* View Sections and SPA Routing */
.view-section {
    display: none;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.4s ease-out forwards;
}

.view-section.active {
    display: flex;
}

.hidden {
    display: none !important;
}

/* Section Typography */
.section-header h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
}

.icon-accent {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary-glow);
}

.section-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Futuristic Textarea / Terminal Container */
.textarea-container {
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
}

.textarea-container:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 15px var(--primary-glow), inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-dot.red { background-color: #ff5f56; }
.terminal-dot.yellow { background-color: #ffbd2e; }
.terminal-dot.green { background-color: #27c93f; }

.terminal-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
    letter-spacing: 1px;
}

textarea {
    width: 100%;
    height: 200px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    padding: 1.2rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.95rem;
    resize: none;
    letter-spacing: 0.5px;
    line-height: 1.5;
}

textarea::placeholder {
    color: rgba(142, 142, 168, 0.35);
    font-weight: 500;
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.encryption-badge {
    background: rgba(0, 229, 255, 0.08);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 229, 255, 0.15);
    font-weight: bold;
}

/* Decrypted Message Box Style */
.decrypted-message-box {
    width: 100%;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    padding: 1.2rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--primary);
    text-shadow: 0 0 5px rgba(0, 229, 255, 0.2);
    line-height: 1.6;
}

/* Custom Scrollbars */
.decrypted-message-box::-webkit-scrollbar,
textarea::-webkit-scrollbar {
    width: 6px;
}

.decrypted-message-box::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
    background: transparent;
}

.decrypted-message-box::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.2);
    border-radius: 3px;
}

.decrypted-message-box::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Action Area & Buttons */
.action-area {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.9rem 2.2rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-glow {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.05);
}

.btn-glow:hover {
    color: #050508;
    background: var(--primary);
    box-shadow: 0 0 25px var(--primary);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Link Box Area */
.link-box-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.input-glow-group {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.input-glow-group:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 15px var(--primary-glow);
}

#linkOutput {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--primary);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    padding: 0.9rem 1.2rem;
    letter-spacing: 0.5px;
}

.btn-input-action {
    background: rgba(0, 229, 255, 0.08);
    border: none;
    border-left: 1px solid var(--border-color);
    color: var(--primary);
    padding: 0 1.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-input-action:hover {
    background: var(--primary);
    color: #050508;
}

.copy-success-message {
    color: var(--success);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    display: none;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
    animation: pulse 1s infinite alternate;
}

/* Warnings and Alerts */
.warning-box {
    background: rgba(255, 145, 0, 0.03);
    border: 1px solid var(--warning);
    border-left: 4px solid var(--warning);
    border-radius: 6px;
    padding: 1.2rem;
    box-shadow: 0 0 15px var(--warning-glow);
}

.warning-header {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    letter-spacing: 1px;
}

.warning-body {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.warning-highlight {
    color: #fff;
    font-weight: 600;
}

.info-alert-box {
    background: rgba(255, 61, 0, 0.03);
    border: 1px solid var(--danger);
    border-left: 4px solid var(--danger);
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 0 15px var(--danger-glow);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-alert-box strong {
    color: #fff;
}

/* Terminal Logs Simulator */
.terminal-logs {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #008ba3;
    max-height: 100px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.log-line {
    word-break: break-all;
}

.log-line.success {
    color: var(--success);
}

.log-line.info {
    color: var(--primary);
}

/* Spinner / Loading Styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 4rem 1rem;
}

.cyber-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 229, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    animation: spin 1s ease-in-out infinite;
}

.loading-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--primary);
    letter-spacing: 1.5px;
    text-align: center;
}

/* Error View Styles */
.read-error-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
    padding: 2rem 0;
}

.error-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.error-icon {
    font-size: 3.5rem;
    color: var(--danger);
    text-shadow: 0 0 15px var(--danger-glow);
}

.error-header h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.error-body {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 480px;
}

.error-body ul {
    list-style: none;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    padding-left: 1.5rem;
}

.error-body li {
    position: relative;
}

.error-body li::before {
    content: '>';
    position: absolute;
    left: -1.2rem;
    color: var(--danger);
    font-family: 'Share Tech Mono', monospace;
}

/* Footer Section */
.cyber-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 1px;
}

.footer-crypto {
    color: var(--primary);
    opacity: 0.6;
}

/* Helpers */
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Media Queries for Responsiveness */
@media (max-width: 600px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .cyber-container {
        gap: 1.5rem;
    }
    
    .content-box {
        padding: 1.5rem 1.2rem;
    }
    
    .cyber-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .system-status {
        align-self: flex-start;
    }
    
    .cyber-title {
        font-size: 1.4rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
    }
    
    .input-glow-group {
        flex-direction: column;
        border-radius: 6px;
    }
    
    .btn-input-action {
        border-left: none;
        border-top: 1px solid var(--border-color);
        justify-content: center;
        padding: 0.8rem;
    }
}
