/* SSH Key Generator Styles */
/* Note: Page header styles are now in main style.css for consistency across all tool pages */

/* Page header width to match container */
.page-header {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* SSH Container */
.ssh-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Security Notice */
.security-notice {
    padding: 24px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}

.notice-content {
    flex: 1;
}

.notice-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.125rem;
    font-weight: 700;
    color: rgb(16, 185, 129);
    margin-bottom: 8px;
}

.notice-icon-inline {
    width: 24px;
    height: 24px;
    color: rgb(16, 185, 129);
    flex-shrink: 0;
}

.notice-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.notice-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Settings Card */
.settings-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    transition: all 0.3s;
}

.settings-card:hover {
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-label svg {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

/* Key Type Grid */
.key-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.key-type-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.key-type-option:hover {
    background: var(--card-bg);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.key-type-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
}

.key-type-option input[type="radio"]:checked ~ .radio-custom {
    border-color: var(--accent-color);
    background: var(--accent-color);
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.key-type-option input[type="radio"]:checked ~ .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.option-content {
    flex: 1;
}

.option-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.option-desc {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Key Size Options */
.key-size-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.size-option {
    cursor: pointer;
}

.size-option input[type="radio"] {
    display: none;
}

.size-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s;
    cursor: pointer;
}

.size-option:hover .size-btn {
    background: var(--card-bg);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.size-option input[type="radio"]:checked ~ .size-btn {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Comment Input */
.comment-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9375rem;
    transition: all 0.3s;
}

.comment-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.input-hint {
    margin-top: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Passphrase Inputs */
.passphrase-inputs {
    display: grid;
    gap: 12px;
}

.input-group {
    position: relative;
}

.passphrase-input {
    width: 100%;
    padding: 12px 48px 12px 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9375rem;
    transition: all 0.3s;
}

.passphrase-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.toggle-visibility {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s;
    border-radius: 6px;
}

.toggle-visibility:hover {
    background: var(--bg-primary);
    color: var(--accent-color);
}

.toggle-visibility svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    margin-bottom: 30px;
}

.generate-btn svg {
    width: 22px;
    height: 22px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

/* Keys Section */
.keys-section {
    animation: fadeInUp 0.6s ease-out;
}

/* Key Card */
.key-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    transition: all 0.3s;
}

.key-card:hover {
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.private-key-card {
    border: 2px solid rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(220, 38, 38, 0.05));
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.card-label svg {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
}

.private-key-card .card-label svg {
    color: rgb(239, 68, 68);
}

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

.action-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: var(--text-secondary);
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.action-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

/* Key Output */
.key-output {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    resize: vertical;
    min-height: 150px;
    line-height: 1.5;
}

.key-output:focus {
    outline: none;
    border-color: var(--accent-color);
}

.key-info {
    margin-top: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Warning Box */
.warning-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    margin-top: 12px;
    color: rgb(239, 68, 68);
    font-size: 0.875rem;
    font-weight: 500;
}

.warning-box svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Info Panel */
.info-panel {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--accent-color);
    margin-top: 30px;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 16px;
    font-size: 1rem;
}

.info-header svg {
    width: 20px;
    height: 20px;
}

.info-list {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.9375rem;
    padding-left: 20px;
}

.info-list li {
    margin-bottom: 12px;
}

.info-list li strong {
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .security-notice {
        padding: 16px;
    }

    .notice-title {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        font-size: 1rem;
        flex-wrap: nowrap;
    }

    .notice-icon-inline {
        width: 18px;
        height: 18px;
        min-width: 18px;
        flex-shrink: 0;
    }

    .notice-text {
        font-size: 0.875rem;
    }

    .key-type-grid {
        grid-template-columns: 1fr;
    }

    .key-size-options {
        flex-direction: column;
    }

    .size-btn {
        display: block;
        text-align: center;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .settings-card {
        padding: 16px;
    }

    .key-output {
        font-size: 0.75rem;
        min-height: 120px;
    }

    .generate-btn {
        font-size: 0.9375rem;
        padding: 14px 20px;
    }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Animation */
.success-flash {
    animation: successFlash 0.5s ease-out;
}

@keyframes successFlash {
    0%, 100% {
        background: var(--bg-primary);
    }
    50% {
        background: rgba(16, 185, 129, 0.2);
    }
}
