/**
 * AZUP Chapter Uploader Styles
 */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

/* Container */
.azup-container {
    max-width: 800px;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ffffff;
}

/* Header */
.azup-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.azup-header h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form styles */
.azup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.azup-form::before {
    content: '';
    position: absolute;
    top: -2.5rem;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    border-radius: 20px 20px 0 0;
}

.azup-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.azup-form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.azup-form-row .azup-form-group {
    flex: 1;
}

/* Labels */
.azup-label {
    color: #e0e6ed;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.azup-required::after {
    content: '*';
    color: #e74c3c;
    margin-left: 4px;
    font-weight: bold;
}

/* Input styles */
.azup-input,
.azup-select {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
}

.azup-input:focus,
.azup-select:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.azup-input:hover,
.azup-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.azup-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Search Select */
.azup-search-select {
    position: relative;
}

.azup-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a252f;
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.azup-search-dropdown.azup-show {
    display: block;
}

.azup-search-item {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.azup-search-item:last-child {
    border-bottom: none;
}

.azup-search-item:hover,
.azup-search-item.azup-highlighted {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
}

.azup-search-loading,
.azup-search-no-results {
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

/* Selected manga display */
.azup-selected-manga {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.azup-selected-title {
    flex: 1;
    font-weight: 500;
}

.azup-clear-selection {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.2s ease;
}

.azup-clear-selection:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Input group */
.azup-input-group {
    display: flex;
    align-items: center;
}

.azup-input-addon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 12px 0 0 12px;
    font-weight: 600;
    border: none;
}

.azup-input-group .azup-input {
    border-radius: 0 12px 12px 0;
}

/* File input */
.azup-file-wrapper {
    position: relative;
}

.azup-file-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.azup-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
}

.azup-file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.azup-file-icon {
    font-size: 1.2rem;
}

/* Checkbox styles */
.azup-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.azup-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.azup-checkbox-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.azup-checkbox {
    position: relative;
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
}

.azup-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.azup-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.azup-checkbox input:checked ~ .azup-checkmark {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.azup-checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.azup-checkbox input:checked ~ .azup-checkmark::after {
    display: block;
}

.azup-checkbox-label {
    color: #e0e6ed;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}

/* Select dropdown */
.azup-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

.azup-select option {
    background-color: #1a252f;
    color: #ffffff;
    padding: 0.75rem 1rem;
}

/* Info/Alert boxes */
.azup-info {
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.2) 0%, rgba(155, 89, 182, 0.2) 100%);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    color: #e0e6ed;
    font-size: 0.95rem;
    line-height: 1.5;
}

.azup-alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.azup-alert-success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.azup-alert-error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

/* Message display */
.azup-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.azup-message.azup-success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.azup-message.azup-error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

/* Progress bar */
.azup-progress {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    height: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.azup-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
    overflow: hidden;
}

.azup-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 50px 50px;
    animation: azup-progress-move 2s linear infinite;
}

@keyframes azup-progress-move {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Submit button */
.azup-submit-btn {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.azup-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

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

.azup-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.azup-submit-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;
}

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

/* Helper text */
.azup-helper {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Divider */
.azup-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 2rem 0;
    border: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .azup-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .azup-header h1 {
        font-size: 2rem;
    }

    .azup-form-row {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .azup-container {
        margin: 0.5rem;
        padding: 1rem;
    }

    .azup-header h1 {
        font-size: 1.75rem;
    }

    .azup-input,
    .azup-select {
        padding: 0.875rem 1rem;
    }

    .azup-submit-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Scrollbar styling */
.azup-search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.azup-search-dropdown::-webkit-scrollbar-track {
    background: #1a252f;
    border-radius: 4px;
}

.azup-search-dropdown::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.azup-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #764ba2 0%, #667eea 100%);
}
