/* styles.css - Main CSS File */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.app-container {
    max-width: 420px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
    position: relative;
}

.header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 60px 20px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.header p {
    font-size: 16px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.user-info {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 16px;
    display: none;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.user-info.show {
    display: flex;
}

.guest-info {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 16px;
    text-align: center;
    display: block;
    position: relative;
    z-index: 1;
}

.guest-info.hide {
    display: none;
}

.login-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.credits-display {
    font-size: 18px;
    font-weight: 600;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

.nav-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-tab {
    flex: 1;
    padding: 15px 8px;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tab.active {
    color: #4f46e5;
    background: white;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
}

.nav-tab:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.tab-content {
    display: none;
    padding: 20px;
    min-height: 60vh;
}

.tab-content.active {
    display: block;
}

.tool-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.tool-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    position: relative;
}

.tool-name {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.tool-category {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-description {
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.tool-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.tool-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.real-estate-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
}

.coming-soon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.coming-soon-card {
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.coming-soon-card:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.ai-selector {
    margin-bottom: 16px;
    border: none;
}

.ai-option {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ai-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.1), transparent);
    transition: left 0.5s;
}

.ai-option:hover::before {
    left: 100%;
}

.ai-option:hover {
    border-color: #4f46e5;
    transform: translateX(4px);
}

.ai-option.selected {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.prompt-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    min-height: 80px;
    resize: vertical;
    transition: all 0.3s ease;
}

.prompt-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.run-test-btn {
    width: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.run-test-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;
}

.run-test-btn:hover::before {
    left: 100%;
}

.run-test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.run-test-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.login-required {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.login-required-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.login-required-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-required-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.search-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.prompt-template {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #374151;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    line-height: 1.4;
}

.copy-btn {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.credit-package {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.credit-package::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.1), transparent);
    transition: left 0.5s;
}

.credit-package:hover::before {
    left: 100%;
}

.credit-package:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #4f46e5;
}

.credit-package.popular {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.credit-package.popular::after {
    content: 'BEST VALUE';
    position: absolute;
    top: -8px;
    right: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.package-credits {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.package-price {
    font-size: 20px;
    font-weight: 600;
    color: #4f46e5;
}

.package-description {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 12px;
}

.package-value {
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
}

.test-area {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.auth-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    color: #1e293b;
    margin-bottom: 8px;
}

.auth-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.auth-input:focus {
    outline: none;
    border-color: #4f46e5;
}

.auth-btn {
    width: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
}

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

.auth-switch a {
    color: #4f46e5;
    text-decoration: none;
    cursor: pointer;
}

.history-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-date {
    font-size: 12px;
    color: #64748b;
}

.history-cost {
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
}

.history-prompt {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.history-ais {
    font-size: 12px;
    color: #64748b;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
}

.close-btn {
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
}

.cta-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.cta-icon {
    font-size: 32px;
    margin-bottom: 12px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.pro-tip {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    text-align: center;
}

.value-prop {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.conversion-hook {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
        margin: 0;
    }
    
    .header {
        padding: 40px 20px 25px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .nav-tab {
        font-size: 12px;
        padding: 12px 6px;
    }
    
    .coming-soon-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}