/* ===================================
   Güvenli Şifre Oluşturucu - Stil Dosyası
   ================================== */

/* CSS Değişkenleri */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f472b6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-input: rgba(51, 65, 85, 0.5);
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: rgba(148, 163, 184, 0.2);
    --border-focus: rgba(99, 102, 241, 0.5);
    
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Outfit', sans-serif;
    
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient-1,
.bg-gradient-2,
.bg-gradient-3 {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.bg-gradient-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.bg-gradient-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.bg-gradient-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--success) 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(-30px, -20px) scale(1.05);
    }
}

/* Header */
.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.5rem;
    color: white;
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 50px rgba(99, 102, 241, 0.6);
    }
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Main Card */
.main-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

/* Password Display */
.password-display-wrapper {
    position: relative;
    display: flex;
    gap: 0.75rem;
}

.password-display {
    flex: 1;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    min-height: 60px;
    display: flex;
    align-items: center;
    word-break: break-all;
    transition: all 0.3s ease;
    overflow: hidden;
}

.password-display:hover {
    border-color: var(--border-focus);
}

.password-display .placeholder-text {
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: normal;
}

.password-display .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) scale(0.5);
    animation: charAppear 0.3s ease forwards;
}

@keyframes charAppear {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.password-display .char.uppercase {
    color: #f472b6;
}

.password-display .char.lowercase {
    color: #60a5fa;
}

.password-display .char.number {
    color: #34d399;
}

.password-display .char.symbol {
    color: #fbbf24;
}

/* Password Actions */
.password-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-btn {
    width: 48px;
    height: 48px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.action-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* Strength Indicator */
.strength-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 3px;
    transition: all 0.5s ease;
    width: 0%;
}

.strength-fill.weak {
    width: 25%;
    background: var(--danger);
}

.strength-fill.fair {
    width: 50%;
    background: var(--warning);
}

.strength-fill.good {
    width: 75%;
    background: var(--secondary);
}

.strength-fill.strong {
    width: 100%;
    background: linear-gradient(90deg, var(--success) 0%, var(--primary) 100%);
}

.strength-text {
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 60px;
}

.strength-text.weak { color: var(--danger); }
.strength-text.fair { color: var(--warning); }
.strength-text.good { color: var(--secondary); }
.strength-text.strong { color: var(--success); }

/* Settings Section */
.settings-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.section-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary-light);
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.length-value {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 45px;
    text-align: center;
}

/* Custom Range */
.custom-range {
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s ease;
}

.custom-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.custom-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Character Options */
.char-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 576px) {
    .char-options {
        grid-template-columns: repeat(4, 1fr);
    }
}

.char-option {
    cursor: pointer;
}

.char-option input {
    display: none;
}

.char-option-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.char-option input:checked + .char-option-box {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
}

.char-option:hover .char-option-box {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.char-preview {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.char-name {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Custom Input */
.custom-input {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.custom-input::placeholder {
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.custom-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

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

.btn-content,
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-loading {
    display: none;
}

.generate-btn.loading .btn-content {
    display: none;
}

.generate-btn.loading .btn-loading {
    display: flex;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Hash Section */
.hash-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.hash-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.hash-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hash-tab:hover {
    border-color: var(--primary-light);
}

.hash-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.hash-display-wrapper {
    display: flex;
    gap: 0.75rem;
}

.hash-display {
    flex: 1;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    word-break: break-all;
    line-height: 1.5;
}

/* Toast */
.toast {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast-body {
    color: var(--text-primary);
}

/* Footer */
.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-credit {
    color: rgba(100, 116, 139, 0.6);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.footer-credit span {
    font-weight: 500;
    color: rgba(100, 116, 139, 0.8);
}

/* Responsive */
@media (max-width: 576px) {
    .main-title {
        font-size: 1.75rem;
    }
    
    .main-card {
        padding: 1.5rem;
    }
    
    .password-display {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .password-display-wrapper {
        flex-direction: column;
    }
    
    .password-actions {
        flex-direction: row;
        justify-content: flex-end;
    }
    
    .hash-display-wrapper {
        flex-direction: column;
    }
    
    .hash-display-wrapper .action-btn {
        align-self: flex-end;
    }
}

/* Shuffle Animation */
@keyframes shuffle {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-5px);
    }
    75% {
        transform: translateY(5px);
    }
}

.password-display.generating .char {
    animation: shuffle 0.1s ease-in-out infinite;
}

/* Matrix Rain Effect for generating */
.password-display.matrix-rain::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        transparent 0%,
        rgba(99, 102, 241, 0.1) 50%,
        transparent 100%
    );
    animation: matrixScan 1s linear infinite;
    pointer-events: none;
}

@keyframes matrixScan {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* Glow effect on new password */
.password-display.new-password {
    animation: glowPulse 0.5s ease-out;
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
    }
    100% {
        box-shadow: none;
    }
}

