/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f1f5f9;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== BACKGROUND ANIMATION ===== */
.background-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

.particle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    background: rgba(16, 185, 129, 0.1);
    animation-delay: -5s;
}

.particle:nth-child(3) {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    background: rgba(245, 158, 11, 0.1);
    animation-delay: -10s;
}

.particle:nth-child(4) {
    width: 250px;
    height: 250px;
    top: 30%;
    right: 20%;
    background: rgba(239, 68, 68, 0.1);
    animation-delay: -7s;
}

.particle:nth-child(5) {
    width: 180px;
    height: 180px;
    bottom: 40%;
    left: 70%;
    background: rgba(139, 92, 246, 0.1);
    animation-delay: -12s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(50px, 50px) rotate(90deg);
    }
    50% {
        transform: translate(0, 100px) rotate(180deg);
    }
    75% {
        transform: translate(-50px, 50px) rotate(270deg);
    }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.logo i {
    font-size: 3rem;
    color: #6366f1;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f1f5f9, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo span {
    color: #10b981;
}

.tagline {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== PASSWORD DISPLAY ===== */
.password-display {
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.password-field {
    flex: 1;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#generatedPassword {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.4rem;
    font-weight: 500;
    color: #f1f5f9;
    word-break: break-all;
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 10px;
}

.password-strength {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-text {
    font-size: 0.9rem;
    color: #94a3b8;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 0.3s, background 0.3s;
}

.strength-level {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

.copy-btn, .refresh-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.copy-btn:hover, .refresh-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.copy-btn:active, .refresh-btn:active {
    transform: translateY(0);
}

/* ===== OPTIONS SECTION ===== */
.options-section {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.options-section h2 {
    color: #f1f5f9;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.options-section h2 i {
    color: #6366f1;
}

.option-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.option-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.option-group h3 {
    color: #cbd5e1;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-group h3 i {
    color: #10b981;
    font-size: 0.9rem;
}

/* ===== LENGTH SLIDER ===== */
.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.option-header label {
    font-weight: 500;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-header label i {
    color: #6366f1;
}

.length-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
}

.slider {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
    margin-bottom: 10px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    border: 3px solid #0f172a;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    border: 3px solid #0f172a;
}

.length-markers {
    display: flex;
    justify-content: space-between;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ===== CHECKBOXES ===== */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.checkbox-label:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #64748b;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s;
}

.checkbox-label input:checked + .checkbox-custom {
    background: #6366f1;
    border-color: #6366f1;
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.checkbox-text {
    flex: 1;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-text i {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ===== PRESET BUTTONS ===== */
.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    color: #cbd5e1;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.preset-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-3px);
    color: #f1f5f9;
}

.preset-btn i {
    font-size: 1rem;
}

.preset-btn[data-preset="basic"] i { color: #10b981; }
.preset-btn[data-preset="strong"] i { color: #f59e0b; }
.preset-btn[data-preset="very-strong"] i { color: #ef4444; }
.preset-btn[data-preset="memorable"] i { color: #8b5cf6; }

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 200px;
    padding: 18px 25px;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
}

.generate-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.generate-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.save-btn {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.save-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateY(-3px);
}

.history-btn {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 2px solid rgba(245, 158, 11, 0.3);
}

.history-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: translateY(-3px);
}

/* ===== HISTORY SECTION ===== */
.history-section {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.history-section.show {
    display: block;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-header h3 {
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-header h3 i {
    color: #f59e0b;
}

.clear-history {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 15px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.clear-history:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.empty-history {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.empty-history i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 10px;
    border-left: 4px solid #6366f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-password {
    font-family: 'Roboto Mono', monospace;
    color: #cbd5e1;
    font-size: 1rem;
    word-break: break-all;
    flex: 1;
}

.history-time {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-left: 15px;
    white-space: nowrap;
}

/* ===== TIPS SECTION ===== */
.tips-section {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tips-section h3 {
    color: #f1f5f9;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips-section h3 i {
    color: #f59e0b;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.tip-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.tip-card i {
    color: #10b981;
    margin-top: 3px;
    font-size: 0.9rem;
}

.tip-card p {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 1.5rem;
    color: #6366f1;
}

.footer-logo h3 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f1f5f9, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-logo span {
    color: #10b981;
}

.disclaimer {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.disclaimer i {
    color: #6366f1;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #6366f1;
}

.footer-links a i {
    font-size: 0.9rem;
}

.copyright {
    color: #64748b;
    font-size: 0.9rem;
}

.copyright i {
    color: #ef4444;
    margin: 0 5px;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #10b981;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
    max-width: 300px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .password-display {
        flex-direction: column;
        align-items: stretch;
    }
    
    .copy-btn, .refresh-btn {
        width: 100%;
        height: 45px;
        margin-top: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        min-width: 100%;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem 0;
    }
    
    .logo {
        flex-direction: column;
        gap: 5px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .options-section {
        padding: 1.5rem;
    }
    
    #generatedPassword {
        font-size: 1.2rem;
    }
    
    .password-strength {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .strength-level {
        text-align: left;
    }
}