* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: background 0.5s ease;
    padding: 15px;
}

body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.container {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    animation: slideIn 0.5s ease;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .container {
    background: rgba(30, 30, 46, 0.95);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Tablet devices (768px and below) */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 25px;
        max-width: 100%;
    }
}

/* Mobile devices (480px and below) */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
        border-radius: 15px;
    }
}

/* Small mobile devices (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 15px;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

h2 i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode h2 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode h2 i {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tablet */
@media (max-width: 768px) {
    h2 {
        font-size: 22px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .header {
        margin-bottom: 20px;
        gap: 10px;
    }

    h2 {
        font-size: 20px;
        gap: 8px;
    }

    h2 i {
        font-size: 18px;
    }
}

/* Small mobile */
@media (max-width: 360px) {
    h2 {
        font-size: 18px;
    }
}

.dark-mode-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

body.dark-mode .dark-mode-toggle {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.dark-mode-toggle:hover {
    transform: rotate(20deg) scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

body.dark-mode .dark-mode-toggle:hover {
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5);
}

.password-container {
    position: relative;
    margin-bottom: 25px;
}

#password {
    width: 100%;
    padding: 15px 50px 15px 15px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    background: #f8f9fa;
    color: #333;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

/* Tablet and mobile */
@media (max-width: 768px) {
    #password {
        font-size: 15px;
        padding: 14px 50px 14px 14px;
    }
}

@media (max-width: 480px) {
    #password {
        font-size: 14px;
        padding: 12px 45px 12px 12px;
    }
}

body.dark-mode #password {
    background: #2a2a3e;
    border-color: #444;
    color: #fff;
}

#password:focus {
    border-color: transparent;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: scale(1.02);
}

body.dark-mode #password:focus {
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15);
}

.copy-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

body.dark-mode .copy-icon {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
}

.copy-icon:hover {
    transform: translateY(-50%) scale(1.2);
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.5));
}

body.dark-mode .copy-icon:hover {
    filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.5));
}

.copy-icon.copied {
    animation: copyPulse 0.5s ease;
}

@keyframes copyPulse {

    0%,
    100% {
        transform: translateY(-50%) scale(1);
    }

    50% {
        transform: translateY(-50%) scale(1.3);
    }
}

.options {
    margin-bottom: 25px;
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.option-row label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

body.dark-mode .option-row label {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.option-row label i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .option-row label i {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.option-row input[type="number"] {
    width: 70px;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 8px;
    outline: none;
    text-align: center;
    background: linear-gradient(white, white) padding-box,
        linear-gradient(135deg, #667eea, #764ba2) border-box;
    color: #333;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

body.dark-mode .option-row input[type="number"] {
    background: linear-gradient(#2a2a3e, #2a2a3e) padding-box,
        linear-gradient(135deg, #ffd700, #ffed4e) border-box;
    color: #fff;
}

.option-row input[type="number"]:focus {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: scale(1.05);
}

body.dark-mode .option-row input[type="number"]:focus {
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15);
}

.generate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
}

body.dark-mode .generate-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

body.dark-mode .generate-btn:hover {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
}

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

.generate-btn i {
    animation: rotate 2s linear infinite;
    font-size: 18px;
}

/* Tablet */
@media (max-width: 768px) {
    .generate-btn {
        padding: 14px;
        font-size: 15px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .generate-btn {
        padding: 13px;
        font-size: 14px;
        gap: 8px;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
    display: none;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease;
    z-index: 1000;
    max-width: 90%;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.notification i {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Tablet */
@media (max-width: 768px) {
    .notification {
        top: 15px;
        right: 15px;
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 15px;
        font-size: 13px;
        border-radius: 8px;
        max-width: calc(100% - 20px);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

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

.notification.show {
    display: flex;
}