/* styles.css - Main stylesheet for A+ Content Platform */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #5a6fd8;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

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

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

small {
    display: block;
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: white;
    margin: 0;
}

.user-info {
    color: white;
}

.logout-btn {
    color: white;
    margin-left: 1rem;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Authentication Page */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
}

.form-toggle {
    display: flex;
    margin-bottom: 2rem;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
}

.toggle-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #667eea;
    color: white;
}

.form-container {
    display: none;
}

.form-container.active {
    display: block;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Packages Page */
.packages-page {
    min-height: 100vh;
}

.main-content {
    padding-bottom: 3rem;
}

.packages-header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.packages-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.packages-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.package-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.package-card.most-popular {
    border: 3px solid #667eea;
    transform: scale(1.05);
}

.package-card.most-popular:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.package-header {
    text-align: center;
    margin-bottom: 2rem;
}

.package-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.package-price {
    margin-bottom: 1rem;
}

.package-price .price {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
}

.package-price .period {
    font-size: 1rem;
    color: #6c757d;
}

.package-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.package-features {
    margin-bottom: 2rem;
}

.package-features ul {
    list-style: none;
    padding: 0;
}

.package-features li {
    padding: 8px 0;
    color: #555;
    position: relative;
    padding-left: 24px;
}

.package-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.package-footer {
    text-align: center;
}

.package-footer .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1.1rem;
}

/* Current Package Status */
.current-package {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.package-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status.completed,
.status.active {
    background: #d4edda;
    color: #155724;
}

.status.pending {
    background: #fff3cd;
    color: #856404;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close {
    font-size: 2rem;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 2rem;
}

.selected-package {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.selected-package h4 {
    margin-bottom: 0.5rem;
}

.selected-package .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

/* Success Page */
.success-page {
    min-height: 100vh;
}

.success-card {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 2rem;
}

.success-icon {
    margin-bottom: 2rem;
}

.success-content h2 {
    color: #28a745;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.success-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.package-details {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: left;
}

.package-details h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.package-info {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.next-steps {
    text-align: left;
    margin: 2rem 0;
}

.next-steps h3 {
    text-align: center;
    margin-bottom: 1rem;
}

.next-steps ul {
    list-style: none;
    padding: 0;
}

.next-steps li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.support-info {
    background: #e7f3ff;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
}

.support-info h4 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 1rem;
}

.support-list {
    list-style: none;
    padding: 0;
}

.support-list li {
    padding: 0.5rem 0;
}

.invoice-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.invoice-details {
    margin: 1.5rem 0;
}

.invoice-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.invoice-item:last-child {
    border-bottom: 2px solid #667eea;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .packages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .package-card.most-popular {
        transform: none;
    }
    
    .package-card.most-popular:hover {
        transform: translateY(-5px);
    }
    
    .auth-container {
        padding: 1rem;
    }
    
    .auth-box {
        padding: 1.5rem;
    }
    
    .success-card {
        padding: 2rem 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .package-status {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .packages-header h2 {
        font-size: 2rem;
    }
    
    .success-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .package-price .price {
        font-size: 2.5rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .header,
    .action-buttons,
    .support-info {
        display: none;
    }
    
    .success-card,
    .invoice-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}