/* RSA Local Styles with Persona Support */

.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

/* Persona Section Styles */
.persona-section {
    margin-bottom: 3rem;
    animation: fadeIn 0.5s ease-out;
}

.persona-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.persona-avatar {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.persona-info h2 {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.2;
}

.persona-role {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Theme Colors */
.bob-section .persona-avatar {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3B82F6;
}

.bob-section .persona-info h2 {
    color: #60A5FA;
}

.alice-section .persona-avatar {
    background: rgba(236, 72, 153, 0.2);
    border-color: #EC4899;
}

.alice-section .persona-info h2 {
    color: #F472B6;
}

/* Themed Cards */
.card.bob-theme {
    border-top: 3px solid #3B82F6;
}

.card.alice-theme {
    border-top: 3px solid #EC4899;
}

.step-card {
    position: relative;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.step-number {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.1);
}

.instruction-text {
    color: #D1D5DB;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.input-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.select-modern {
    width: 100%;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.select-modern option {
    background-color: #1F2937;
    color: white;
}

.math-display {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.math-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.math-item .label {
    font-size: 0.9rem;
    color: #9CA3AF;
}

.math-item .value {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    color: var(--highlight-color);
    font-weight: bold;
}

.keys-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.key-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.key-box:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.public-key .key-icon {
    font-size: 2rem;
    filter: hue-rotate(90deg);
    align-self: center;
}

.private-key .key-icon {
    font-size: 2rem;
    filter: hue-rotate(-45deg);
    align-self: center;
}

.key-info {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
}

.key-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9CA3AF;
    margin-bottom: 0.25rem;
}

.key-value {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    color: white;
}

.key-action {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.badge {
    font-size: 0.75rem;
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.badge.secure {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
}

.calculation-display {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-row:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}

.calc-label {
    color: #9CA3AF;
}

.calc-formula {
    font-family: 'Space Mono', monospace;
    color: #D1D5DB;
}

.result-box {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.result-box.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.result-label {
    font-weight: 500;
    color: white;
}

.result-value {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.action-note {
    text-align: center;
    margin-top: 1.5rem;
    color: #F472B6;
    /* Alice's color */
    font-style: italic;
    animation: pulse 2s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes pulse {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.7;
    }
}

@media (max-width: 640px) {

    .input-row,
    .keys-container,
    .math-display {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}