/* Custom styles for PGP Practice Lab */

:root {
    --pgp-primary: #0d6efd;
    --pgp-success: #198754;
    --pgp-warning: #ffc107;
    --pgp-danger: #dc3545;
    --pgp-info: #0dcaf0;
    --pgp-dark: #212529;
}

/* Body and layout improvements */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* Navigation enhancements */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Card enhancements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

/* Button improvements */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--pgp-primary), #0a58ca);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--pgp-success), #146c43);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--pgp-warning), #ffca2c);
    border: none;
    color: var(--pgp-dark);
}

.btn-info {
    background: linear-gradient(135deg, var(--pgp-info), #3dd5f3);
    border: none;
    color: var(--pgp-dark);
}

/* Form improvements */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--pgp-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

/* Textarea specific styling */
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

textarea.font-monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Alert improvements */
.alert {
    border: none;
    border-radius: 0.75rem;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--pgp-success);
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.1), rgba(25, 135, 84, 0.05));
}

.alert-warning {
    border-left-color: var(--pgp-warning);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 193, 7, 0.25)) !important;
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.alert-warning .fas {
    color: #ffffff !important;
}

.alert-danger {
    border-left-color: var(--pgp-danger);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
}

.alert-info {
    border-left-color: var(--pgp-info);
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.1), rgba(13, 202, 240, 0.05));
}

/* Icon styling */
.fas, .fab {
    margin-right: 0.25rem;
}

/* Special styling for cryptographic content */
.crypto-content {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    word-break: break-all;
}

/* Footer styling */
footer {
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn {
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-2 {
        flex-wrap: wrap;
    }
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Copy button feedback */
.btn.copied {
    background-color: var(--pgp-success) !important;
    border-color: var(--pgp-success) !important;
}

.btn.copied::after {
    content: " ✓";
}

/* Private key reveal animation */
#privateKey {
    transition: all 0.5s ease;
}

#privateKey.revealed {
    filter: none !important;
}

/* Educational content styling */
.educational-content {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05), rgba(13, 110, 253, 0.02));
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.success {
    background-color: var(--pgp-success);
    box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.3);
}

.status-indicator.warning {
    background-color: var(--pgp-warning);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

.status-indicator.danger {
    background-color: var(--pgp-danger);
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus improvements for accessibility */
.btn:focus,
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Dark mode specific adjustments */
[data-bs-theme="dark"] .crypto-content {
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .educational-content {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(13, 110, 253, 0.05));
}

/* Improved text contrast for better readability */
.alert-info {
    color: #ffffff !important;
    font-weight: 500;
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.25), rgba(13, 202, 240, 0.2)) !important;
    border-left: 4px solid #0dcaf0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.alert-info .fas {
    color: #ffffff !important;
}

/* Key status section improvements */
.card-body .text-muted {
    color: #e9ecef !important;
    font-weight: 500;
    line-height: 1.6;
}

/* Session info box specific styling */
.alert-info.session-info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.2), rgba(13, 202, 240, 0.15)) !important;
    border-left: 4px solid #0dcaf0;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.alert-info.session-info strong {
    color: #ffffff !important;
    font-weight: 600;
}
