/* Smart Password Generator Pro - Styles */

/* Container */
.spg-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.spg-container.spg-compact {
    max-width: 600px;
    padding: 15px;
}

.spg-container.spg-theme-dark {
    background: #2d2d2d;
    color: #ffffff;
}

/* Sections */
.spg-settings,
.spg-results,
.spg-history {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.spg-theme-dark .spg-settings,
.spg-theme-dark .spg-results,
.spg-theme-dark .spg-history {
    background: #3d3d3d;
    color: #ffffff;
}

/* Tabs */
.spg-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 2px solid #e0e0e0;
}

.spg-theme-dark .spg-tabs {
    border-bottom-color: #555;
}

.spg-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    color: inherit;
}

.spg-tab:hover {
    background: #f5f5f5;
}

.spg-theme-dark .spg-tab:hover {
    background: #4d4d4d;
}

.spg-tab.active {
    border-bottom-color: #4CAF50;
    color: #4CAF50;
    font-weight: bold;
}

/* Info Box */
.spg-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
    margin-bottom: 20px;
}

.spg-theme-dark .spg-info {
    background: #1e3a5f;
    border-left-color: #64b5f6;
}

/* Controls */
.spg-control-group {
    margin-bottom: 20px;
}

.spg-control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.spg-theme-dark .spg-control-group label {
    color: #ffffff;
}

/* Sliders */
.spg-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.spg-theme-dark .spg-slider {
    background: #555;
}

.spg-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

.spg-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: none;
}

/* Select */
.spg-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #333;
}

.spg-theme-dark .spg-select {
    background: #4d4d4d;
    border-color: #666;
    color: #fff;
}

/* Options */
.spg-options {
    margin: 20px 0;
}

.spg-options h4 {
    margin-bottom: 12px;
    color: #555;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spg-theme-dark .spg-options h4 {
    color: #ccc;
}

/* Checkboxes */
.spg-checkbox {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
}

.spg-checkbox input {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.spg-checkbox span {
    color: #666;
    vertical-align: middle;
}

.spg-theme-dark .spg-checkbox span {
    color: #ddd;
}

/* Buttons */
.spg-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    margin-right: 10px;
}

.spg-button:hover {
    background: #45a049;
}

.spg-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spg-button-secondary {
    background: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.spg-button-secondary:hover {
    background: #1976D2;
}

/* Password Items */
.spg-password-item {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    position: relative;
    animation: slideIn 0.3s ease-in-out;
}

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

.spg-theme-dark .spg-password-item {
    background: #4d4d4d;
}

/* Sentence Display */
.spg-sentence-display {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #4CAF50;
}

.spg-theme-dark .spg-sentence-display {
    background: #2d2d2d;
    border-left-color: #66bb6a;
}

.spg-sentence-label {
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 8px;
}

.spg-password-label {
    font-weight: bold;
    color: #2196F3;
    margin: 15px 0 8px 0;
}

.spg-sentence-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 10px;
}

.spg-theme-dark .spg-sentence-text {
    color: #fff;
}

.spg-sentence-explanation {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.spg-theme-dark .spg-sentence-explanation {
    color: #aaa;
}

/* Password Text */
.spg-password-text {
    font-family: "Courier New", monospace;
    font-size: 18px;
    word-break: break-all;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 3px;
    border: 1px solid #ddd;
    position: relative;
    user-select: all;
}

.spg-theme-dark .spg-password-text {
    background: #2d2d2d;
    border-color: #555;
    color: #0f0;
}

/* Password Actions */
.spg-password-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.spg-copy-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.spg-copy-btn:hover {
    background: #1976D2;
}

.spg-copy-btn.copied {
    background: #4CAF50;
}

/* Strength Indicator */
.spg-strength {
    margin-top: 10px;
    padding: 8px;
    background: white;
    border-radius: 3px;
}

.spg-theme-dark .spg-strength {
    background: #2d2d2d;
}

.spg-strength-bar-container {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.spg-theme-dark .spg-strength-bar-container {
    background: #555;
}

.spg-strength-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

.spg-strength-info {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    line-height: 1.4;
}

.spg-theme-dark .spg-strength-info {
    color: #bbb;
}

/* Mnemonic */
.spg-mnemonic {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    border-left: 4px solid #2196F3;
}

.spg-theme-dark .spg-mnemonic {
    background: #1e3a5f;
    border-left-color: #64b5f6;
}

.spg-mnemonic-simple {
    font-weight: bold;
    color: #1976D2;
    font-size: 14px;
}

.spg-theme-dark .spg-mnemonic-simple {
    color: #64b5f6;
}

.spg-mnemonic-creative {
    color: #666;
    font-style: italic;
    display: block;
    margin-top: 5px;
}

.spg-theme-dark .spg-mnemonic-creative {
    color: #aaa;
}

/* Widget Styles */
.spg-widget {
    padding: 10px;
}

.spg-widget .spg-control-group {
    margin-bottom: 15px;
}

.spg-widget .spg-button {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

.spg-widget .spg-password-text {
    font-size: 14px;
    padding: 8px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .spg-container {
        padding: 15px;
        margin: 10px;
    }
    
    .spg-settings,
    .spg-results,
    .spg-history {
        padding: 15px;
    }
    
    .spg-password-text {
        font-size: 14px;
    }
    
    .spg-button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .spg-tabs {
        flex-direction: column;
    }
    
    .spg-tab {
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .spg-tab.active {
        border-left-color: #4CAF50;
        border-bottom-color: transparent;
    }
}

/* Print Styles */
@media print {
    .spg-button,
    .spg-copy-btn,
    .spg-tabs,
    .spg-settings {
        display: none !important;
    }
    
    .spg-password-text {
        background: white !important;
        color: black !important;
        border: 1px solid #000 !important;
    }
}

/* Accessibility */
.spg-button:focus,
.spg-copy-btn:focus,
.spg-tab:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Loading Animation */
.spg-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Success Animation */
@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.spg-success {
    animation: success 0.5s ease-in-out;
}