/*
Theme Name: PWA Marketplace
Description: Tema profesional para marketplace de PWAs
Version: 1.0
*/

:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --dark: #212529;
    --light: #f8f9fa;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #f5f7fb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    color: var(--primary);
    font-size: 1.8rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary);
}

.user-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
}

.hero {
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Dashboard Styles */
.dashboard {
    padding: 2rem 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.pwa-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Form Styles */
.pwa-form-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Marketplace Grid */
.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.pwa-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.pwa-card:hover {
    transform: translateY(-5px);
}

.pwa-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--success));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.pwa-content {
    padding: 1.5rem;
}

.pwa-content h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.pwa-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Script Display */
.script-container {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

.script-code {
    white-space: pre-wrap;
    word-break: break-all;
}

.copy-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 0.5rem;
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .marketplace-grid {
        grid-template-columns: 1fr;
    }
}

/* Páginas de Login y Registro Personalizadas */
.custom-login-page,
.custom-register-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container,
.register-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-container::before,
.register-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff8a00, #e52e71, #5e50ff, #00b4ff);
}

.login-header,
.register-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo,
.register-logo {
    text-decoration: none;
    display: block;
    margin-bottom: 20px;
}

.login-header h1,
.register-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.login-header p,
.register-header p {
    color: #718096;
    font-size: 1rem;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.form-group .input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-group .input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.remember-me {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #4a5568;
}

.remember-me input {
    margin-right: 8px;
}

.lost-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.lost-password:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.login-submit,
.register-submit {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.login-submit:hover,
.register-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Separadores sociales */
.social-login-separator,
.social-register-separator {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: #a0aec0;
    font-size: 0.9rem;
}

.social-login-separator::before,
.social-register-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.social-login-separator span,
.social-register-separator span {
    background: white;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

/* Botones sociales */
.social-login-buttons,
.social-register-buttons {
    margin-bottom: 25px;
}

.social-login-buttons .nsl-container,
.social-register-buttons .nsl-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-login-buttons .nsl-button,
.social-register-buttons .nsl-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: 2px solid #e2e8f0 !important;
    background: white !important;
    color: #4a5568 !important;
}

.social-login-buttons .nsl-button:hover,
.social-register-buttons .nsl-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    border-color: #667eea !important;
}

/* Mensajes de error y éxito */
.login-error,
.register-error {
    background: #fed7d7;
    color: #c53030;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #f56565;
    font-size: 0.9rem;
}

.register-success {
    background: #c6f6d5;
    color: #2f855a;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #48bb78;
    font-size: 0.9rem;
}

/* Footer de login/register */
.login-footer,
.register-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #718096;
}

.login-footer a,
.register-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover,
.register-footer a:hover {
    text-decoration: underline;
}

.privacy-text {
    font-size: 0.8rem;
    color: #718096;
    text-align: center;
    margin-bottom: 20px;
}

.privacy-text a {
    color: #667eea;
    text-decoration: none;
}

.privacy-text a:hover {
    text-decoration: underline;
}

.registration-closed {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container,
    .register-container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .login-header h1,
    .register-header h1 {
        font-size: 1.7rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

.login-info {
    background: #bee3f8;
    color: #2c5282;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #4299e1;
    font-size: 0.9rem;
}