/**
 * AI Design Studio - Frontend Styles
 * Mobile-first responsive design
 */

/* Container */
.aides-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.aides-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 30px;
}

.aides-logo h1 {
    margin: 0;
    font-size: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aides-user-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.aides-tokens {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aides-token-icon {
    font-size: 20px;
}

.aides-token-count {
    font-size: 18px;
}

.aides-subscription-badge {
    background: #ffd700;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* Navigation */
.aides-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.aides-nav-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.aides-nav-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.aides-nav-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.aides-nav-icon {
    font-size: 20px;
}

/* Content */
.aides-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.aides-view {
    animation: fadeIn 0.3s ease;
}

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

/* Upload Section */
.aides-upload-section h2 {
    font-size: 32px;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aides-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.aides-upload-container {
    margin-bottom: 30px;
}

.aides-upload-area {
    border: 3px dashed #ddd;
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.aides-upload-area:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.aides-upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.aides-upload-area h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.aides-upload-area p {
    color: #666;
    margin-bottom: 20px;
}

.aides-preview-area {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.aides-preview-area img {
    width: 100%;
    height: auto;
    display: block;
}

.aides-btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aides-btn-remove:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

/* Style Options */
.aides-style-options {
    margin-top: 30px;
}

.aides-style-options h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.aides-design-type {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.aides-radio-card {
    position: relative;
    cursor: pointer;
}

.aides-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.aides-radio-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
}

.aides-radio-card input[type="radio"]:checked + .aides-radio-content {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.aides-radio-icon {
    font-size: 28px;
}

.aides-radio-label {
    font-weight: 600;
    font-size: 16px;
}

.aides-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.aides-style-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
}

.aides-style-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.aides-style-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.aides-custom-prompt {
    margin-bottom: 30px;
}

.aides-custom-prompt label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.aides-custom-prompt textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    min-height: 100px;
}

.aides-custom-prompt textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.aides-btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.aides-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.aides-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.aides-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.aides-btn-secondary:hover {
    background: #667eea;
    color: white;
}

.aides-btn-large {
    padding: 18px 40px;
    font-size: 18px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.aides-btn-tokens {
    font-size: 14px;
    opacity: 0.9;
}

.aides-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Results */
.aides-result-area h3 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.aides-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.aides-comparison-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.aides-comparison-item img {
    width: 100%;
    height: auto;
    display: block;
}

.aides-comparison-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 15px;
    font-weight: 600;
    text-align: center;
}

.aides-products-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.aides-products-section h4 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.aides-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.aides-product-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.aides-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.aides-product-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 15px;
}

.aides-product-category {
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.aides-product-network {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}

.aides-result-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Gallery */
.aides-gallery-section h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.aides-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.aides-gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.aides-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.aides-gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.aides-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.aides-gallery-item:hover .aides-gallery-overlay {
    opacity: 1;
}

.aides-gallery-stats {
    display: flex;
    gap: 15px;
    color: white;
    margin-bottom: 10px;
    font-size: 14px;
}

.aides-gallery-date {
    color: white;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Account */
.aides-account-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
}

.aides-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.aides-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    padding: 30px;
}

.aides-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.aides-token-balance {
    text-align: center;
    margin: 30px 0;
}

.aides-token-amount {
    display: block;
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aides-token-label {
    display: block;
    color: #666;
    margin-top: 10px;
}

.aides-subscription-info p {
    margin: 10px 0;
    color: #666;
}

.aides-status-active {
    color: #27ae60;
    font-weight: 600;
}

/* Subscription Plans */
.aides-subscription-plans h3 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.aides-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.aides-plan-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.aides-plan-featured {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.aides-plan-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.aides-plan-card h4 {
    font-size: 24px;
    margin-bottom: 20px;
}

.aides-plan-price {
    margin-bottom: 30px;
}

.aides-price-amount {
    font-size: 48px;
    font-weight: 700;
    color: #333;
}

.aides-price-period {
    color: #666;
    font-size: 18px;
}

.aides-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
}

.aides-plan-features li {
    padding: 12px 0;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.aides-plan-features li:last-child {
    border-bottom: none;
}

/* Loading */
.aides-loading {
    text-align: center;
    padding: 60px 20px;
}

.aides-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.aides-loading p {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.aides-loading-subtitle {
    color: #666;
    font-size: 14px;
}

/* Empty state */
.aides-empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.aides-empty-message a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

/* Login required */
.aides-login-required {
    text-align: center;
    padding: 80px 20px;
}

.aides-login-required p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .aides-container {
        padding: 15px;
    }
    
    .aides-content {
        padding: 25px 20px;
    }
    
    .aides-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .aides-logo h1 {
        font-size: 24px;
    }
    
    .aides-user-info {
        flex-direction: column;
        width: 100%;
    }
    
    .aides-tokens,
    .aides-subscription-badge {
        width: 100%;
        justify-content: center;
    }
    
    .aides-nav {
        justify-content: flex-start;
    }
    
    .aides-nav-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .aides-upload-section h2 {
        font-size: 24px;
    }
    
    .aides-upload-area {
        padding: 40px 15px;
    }
    
    .aides-style-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .aides-style-card {
        padding: 20px 10px;
        font-size: 13px;
    }
    
    .aides-comparison {
        grid-template-columns: 1fr;
    }
    
    .aides-result-actions {
        flex-direction: column;
    }
    
    .aides-result-actions .aides-btn {
        width: 100%;
    }
    
    .aides-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .aides-gallery-item img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .aides-upload-icon {
        font-size: 48px;
    }
    
    .aides-upload-area h3 {
        font-size: 18px;
    }
    
    .aides-gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .aides-products-grid {
        grid-template-columns: 1fr;
    }
    
    .aides-account-grid {
        grid-template-columns: 1fr;
    }
    
    .aides-plans-grid {
        grid-template-columns: 1fr;
    }
}

/* Account Icon Button */
.aides-account-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 15px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aides-account-icon-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.aides-account-icon-btn svg {
    width: 24px;
    height: 24px;
}
