
/* 🔐 Universal Passcode Generator - Passphrase Specific Styles */

/* Passphrase Step Common Elements */
select, input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 20px;
    transition: border-color 0.3s;
}

select:focus, input:focus {
    outline: none;
    border-color: #4CAF50;
}

.btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 20px 32px !important;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin: 8px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    letter-spacing: 0.5px;
    text-transform: none;
    min-height: 56px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    background: linear-gradient(45deg, #66BB6A, #4CAF50);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: linear-gradient(45deg, #FF9800, #F57C00);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #FFB74D, #FF9800);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107, #e0a800);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(45deg, #FFD54F, #FFC107);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

.hidden {
    display: none !important;
}

.controls-section {
    background: #f8f9fa;
    padding: 3px;
    border-radius: 6px;
    margin-bottom: 3px;
}

.control-group {
    margin-bottom: 8px;
}

.control-row {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.control-item {
    flex: 1;
    min-width: 160px;
}

.output-section {
    background: #f8f9fa;
    border-radius: 6px;
    margin: 0;
    padding: 0;
}

.status-message {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 600;
    text-align: center;
}

.status-success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4CAF50;
}

.status-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

/* Passphrase Container - Minimal spacing for nested containers */
.passphrase-container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: static;
}

.passphrase-header {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 3px;
    text-align: center;
}

.passphrase-header h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
}

.passphrase-header p {
    font-size: 1em;
    opacity: 0.9;
    margin: 0;
}

.passphrase-main-content {
    padding: 2px;
}

        .passphrase-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 2px;
            margin: 10px 0;
            max-width: none;
            justify-content: center;
        }

        .passphrase-container .passphrase-char {
            padding: 4px;
            border-radius: 8px;
            text-align: center;
            font-weight: 600;
            font-size: 24px;
            border: 2px solid;
            position: relative;
            transition: all 0.3s;
            font-family: 'Consolas', 'Monaco', 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace !important;
            min-height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            width: 35px;
            color: #000000 !important;
            font-style: normal !important;
        }

        /* Character type color coding */
        .passphrase-container .passphrase-char.char-uppercase {
            background: linear-gradient(45deg, #e8f5e8, #c8e6c8);
            border-color: #4CAF50;
            color: #000000 !important;
            font-style: normal !important;
        }

        .passphrase-container .passphrase-char.char-lowercase {
            background: linear-gradient(45deg, #e3f2fd, #bbdefb);
            border-color: #2196F3;
            color: #000000 !important;
            font-style: normal !important;
        }

        .passphrase-container .passphrase-char.char-number {
            background: linear-gradient(45deg, #fff3e0, #ffcc80);
            border-color: #FF9800;
            color: #000000 !important;
            font-style: normal !important;
        }

        .passphrase-container .passphrase-char.char-special {
            background: linear-gradient(45deg, #fce4ec, #f8bbd9);
            border-color: #E91E63;
            color: #000000 !important;
            font-style: normal !important;
        }

        .passphrase-container .passphrase-char.char-custom {
            background: linear-gradient(45deg, #f3e5f5, #ce93d8);
            border-color: #9C27B0;
            color: #000000 !important;
            font-style: normal !important;
        }


        .passphrase-char:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
        }

        .passphrase-char.hidden-char {
            color: transparent;
            user-select: none;
        }

        .passphrase-container .passphrase-char.hidden-char::after {
            content: '•';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #757575 !important;
            font-size: 28px;
        }

        .passphrase-container .passphrase-char.revealed {
            animation: revealPulse 0.5s ease;
            color: #000000 !important;
            font-style: normal !important;
        }

        /* Interactive highlighting for legend */
        .legend-item:hover {
            background: rgba(33, 150, 243, 0.1);
            transform: scale(1.05);
        }

        .passphrase-container .passphrase-char.highlighted {
            transform: translateY(-3px) scale(1.1);
            box-shadow: 0 8px 20px rgba(33, 150, 243, 0.4);
            z-index: 10;
            position: relative;
            color: #000000 !important;
            font-style: normal !important;
        }

        /* Ensure hidden state maintains character type colors */
        .passphrase-container .passphrase-char.hidden-char.char-uppercase {
            background: linear-gradient(45deg, #e8f5e8, #c8e6c8);
            border-color: #4CAF50;
            color: transparent !important;
            font-style: normal !important;
        }

        .passphrase-container .passphrase-char.hidden-char.char-lowercase {
            background: linear-gradient(45deg, #e3f2fd, #bbdefb);
            border-color: #2196F3;
            color: transparent !important;
            font-style: normal !important;
        }

        .passphrase-container .passphrase-char.hidden-char.char-number {
            background: linear-gradient(45deg, #fff3e0, #ffcc80);
            border-color: #FF9800;
            color: transparent !important;
            font-style: normal !important;
        }

        .passphrase-container .passphrase-char.hidden-char.char-special {
            background: linear-gradient(45deg, #fce4ec, #f8bbd9);
            border-color: #E91E63;
            color: transparent !important;
            font-style: normal !important;
        }

        .passphrase-container .passphrase-char.hidden-char.char-custom {
            background: linear-gradient(45deg, #f3e5f5, #ce93d8);
            border-color: #9C27B0;
            color: transparent !important;
            font-style: normal !important;
        }

        /* Viewed/clicked characters - light gray theme */
        .passphrase-container .passphrase-char.viewed.hidden-char {
            background: linear-gradient(45deg, #f5f5f5, #e8e8e8) !important;
            border-color: #999999 !important;
            color: transparent !important;
            font-style: normal !important;
        }

        .passphrase-container .passphrase-char.viewed.revealed {
            background: linear-gradient(45deg, #f5f5f5, #e8e8e8) !important;
            border-color: #999999 !important;
            color: #000000 !important;
            font-style: normal !important;
        }

        @keyframes revealPulse {
            0% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
            }

            100% {
                transform: scale(1);
            }
        }

        .passphrase-char::before {
            content: attr(data-index);
            position: absolute;
            top: -10px;
            left: 50%;
            transform: translateX(-50%);
            background: #2196f3;
            color: white;
            padding: 2px 6px;
            border-radius: 10px;
            font-size: 10px;
            font-weight: bold;
            min-width: 16px;
        }



        .info-panel {
            background: #e8f5e8;
            border: 1px solid #4CAF50;
            border-radius: 6px;
            padding: 10px;
            margin: 8px 0;
        }

        .info-panel h3 {
            color: #2e7d32;
            margin-bottom: 8px;
            font-size: 1.1em;
        }

        .info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }

        .info-item {
            background: white;
            padding: 15px;
            border-radius: 6px;
            border-left: 4px solid #4CAF50;
        }

        .info-item strong {
            color: #2e7d32;
        }

        .copy-section {
            text-align: center;
            margin: 20px 0;
        }

        .copy-formats {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }

        /* Mobile Responsive Styles for Passphrase */
        @media (max-width: 768px) {
            .passphrase-container {
                margin: 0;
                border-radius: 6px;
            }

            .passphrase-header {
                padding: 12px;
            }

            .passphrase-header h1 {
                font-size: 1.5rem;
                margin-bottom: 4px;
            }

            .passphrase-header p {
                font-size: 0.9rem;
                margin: 0;
            }

            .passphrase-main-content {
                padding: 2px;
            }

            .controls-section {
                padding: 2px;
                margin-bottom: 2px;
                border-radius: 4px;
            }

            .control-row {
                flex-direction: column;
                gap: 15px;
            }

            .control-item {
                min-width: 100%;
            }

            select, input {
                font-size: 16px;
                padding: 12px;
            }

            .btn {
                padding: 18px 24px;
                font-size: 16px;
                width: 100%;
                margin: 8px 0;
                border-radius: 10px;
                min-height: 52px;
            }

            .passphrase-grid {
                gap: 6px 2px;
                margin: 6px 0;
                justify-content: center;
            }

            .passphrase-container .passphrase-char {
                width: 30px;
                min-height: 40px;
                font-size: 18px;
                padding: 3px;
                border-radius: 6px;
            }

            .passphrase-char::before {
                font-size: 8px;
                padding: 1px 4px;
                top: -8px;
            }

            .copy-formats {
                flex-direction: column;
                gap: 8px;
            }

            .info-grid {
                grid-template-columns: 1fr;
                gap: 6px;
            }

            .info-item {
                padding: 8px;
            }
            /* Reduce legend item padding on mobile */
            .legend-item {
                padding: 6px !important;
            }
        }

        @media (max-width: 480px) {
            /* Further reduce legend item padding on small mobile */
            .legend-item {
                padding: 4px !important;
            }
            .passphrase-header {
                padding: 15px 10px;
            }

            .passphrase-header h1 {
                font-size: 1.5rem;
            }

            .passphrase-main-content {
                padding: 2px;
            }

            .controls-section {
                padding: 2px;
            }

            .passphrase-grid {
                gap: 6px 2px;
            }

            .passphrase-container .passphrase-char {
                width: 28px;
                min-height: 36px;
                font-size: 16px;
            }

            select, input {
                font-size: 16px;
                padding: 10px;
            }

            .btn {
                padding: 10px 15px;
                font-size: 13px;
            }
        }
