/* Global Styles */
:root {
    --primary-color: #007BFF;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --text-color: #333;
    --bg-color: #f4f4f4;
}

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

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

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

/* Main content area */
main {
    padding-top: 80px; /* Add space for the fixed header */
    min-height: calc(100vh - 200px);
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 600;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
    text-decoration: none;
}

/* Hero Section */
.hero {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Features Section */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
    transition: transform 0.3s ease;
}

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

.premium-badge {
    background-color: #ffd700;
    color: #333;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.feature-card.premium {
    border: 2px solid #ffd700;
    position: relative;
}

.feature-card.premium::before {
    content: "★";
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ffd700;
    color: #333;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    background-color: #0069d9;
    text-decoration: none;
}

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

.btn-secondary:hover {
    background-color: #5a6268;
    text-decoration: none;
}

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

.btn-danger:hover {
    background-color: #c82333;
    text-decoration: none;
}

.cta-buttons {
    margin-top: 2rem;
}

.cta-buttons .btn {
    margin: 0 0.5rem;
}

/* Forms */
.form-section {
    padding: 3rem 0;
}

.form-container {
    max-width: 500px;
    margin: 0 auto;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

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

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    display: none;
}

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

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

/* Dashboard Section */
.dashboard-section {
    padding: 2rem 0;
}

.user-info {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.user-details {
    flex: 1;
}

.user-details h3 {
    margin-bottom: 0.5rem;
}

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

.dashboard-card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.license-status {
    border-left: 5px solid var(--primary-color);
}

.add-device {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* License History Table */
.license-table {
    width: 100%;
    border-collapse: collapse;
}

.license-table th, 
.license-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.license-table th {
    background-color: var(--light-color);
}

.device-list-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.device-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

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

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

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    
    .premium-badge {
        font-size: 0.725rem;
        padding: 0.225rem 0.45rem;
    }
    
    .feature-icon {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-card h3 {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 1rem;
    }
    
    nav ul li {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .premium-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .feature-card.premium::before {
        width: 20px;
        height: 20px;
        font-size: 12px;
        top: -8px;
        right: -8px;
    }
    
    .feature-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .feature-card h3 {
        font-size: 0.95rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Empty states and status cards */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
}

.status-card {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-card.active {
    border-left: 4px solid var(--success-color);
}

.status-icon {
    font-size: 2rem;
    margin-right: 1.5rem;
}

.status-content h4 {
    margin-bottom: 0.5rem;
}

.pending-request {
    border-left: 4px solid var(--primary-color);
}

/* Payment related styles */
.payment-section {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #f9f9f9;
}

.payment-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.paypal-placeholder {
    padding: 1rem;
    background-color: #f2f2f2;
    border-radius: 4px;
    text-align: center;
    color: var(--secondary-color);
}

.paypal-button {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    margin: 1rem 0;
}

.paypal-header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem;
    text-align: center;
    font-weight: bold;
}

.paypal-details {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: #f9f9f9;
}

.device-reference, .price-reference {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.payment-note {
    font-size: 0.9rem;
    margin: 1rem 0;
    color: var(--secondary-color);
}

.payment-info {
    font-size: 0.9rem;
    color: var(--text-color);
    padding: 0.8rem;
    background-color: rgba(0, 123, 255, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}
.payment-note {
    margin-top: 1rem;
    font-weight: bold;
    color: var(--primary-color);
}

.paypal-logo {
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 5px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--dark-color);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

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

.btn {
    display: inline-block;
    background-color: white;
    color: var(--primary-color);
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: white;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--light-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

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

/* How It Works Section */
.how-it-works {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

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

/* Payment section styles */
.payment-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.payment-section h4 {
    margin-bottom: 0.5rem;
}

.paypal-button {
    margin: 1rem 0;
    max-width: 400px;
}

/* These styles are kept for backward compatibility */
.btn-paypal {
    background-color: #003087;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-paypal:hover {
    background-color: #001f52;
    color: white;
}

.btn-paypal img {
    height: 20px;
    width: auto;
}

/* Make PayPal hosted button responsive */
#paypal-container-NPL475V28TC2L {
    width: 100%;
    min-height: 50px;
}

.paypal-placeholder {
    border: 1px dashed #ccc;
    background-color: #f8f8f8;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    margin: 1rem 0;
}

.placeholder-message {
    color: #666;
    font-style: italic;
}

.device-reference {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #333;
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.payment-info {
    font-size: 0.9rem;
    color: #333;
    margin-top: 10px;
    background-color: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.payment-note {
    font-size: 0.9rem;
    color: #666;
}

.highlight-payment {
    animation: pulse-highlight 2s ease-in-out;
    box-shadow: 0 0 15px rgba(0,48,135,0.5);
    border-radius: 8px;
    padding: 15px;
}

@keyframes pulse-highlight {
    0% { background-color: rgba(0,48,135,0.1); }
    50% { background-color: rgba(0,48,135,0.2); }
    100% { background-color: rgba(0,48,135,0.1); }
}

/* User management styles */
.user-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: var(--accent-color);
    border-radius: 6px;
    padding: 1rem;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-card h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.stat-card p {
    font-size: 1.5rem;
    font-weight: bold;
}

.user-list-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.btn-info {
    background-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
}

/* Download Section */
.download {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.download h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.download p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.download-card {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.download-info {
    flex: 1;
    text-align: left;
    min-width: 300px;
}

.download-info h3 {
    color: var(--text-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.version {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.release-date {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

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

.features-list li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.download-button {
    flex: 0 0 auto;
    text-align: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.file-size {
    margin-top: 1rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.github-link {
    margin-top: 3rem;
}

.github-link p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.github-link .btn-outline {
    border: 2px solid white;
    color: white;
    background: transparent;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .download-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
    
    .download-info {
        text-align: center;
    }
    
    .download h2 {
        font-size: 2rem;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }
}

/* Downloads Grid Layout */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.download-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 450px;
}

.platform-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.download-info {
    flex: 1;
    text-align: center;
}

.download-info h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.features-list {
    text-align: left;
    margin-bottom: 2rem;
}

/* Installation Notes */
.installation-notes {
    margin-bottom: 3rem;
}

.installation-notes h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

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

.note-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.note-card h4 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-card p {
    color: white;
    line-height: 1.6;
    opacity: 0.9;
    text-align: left;
}

.note-card code {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .downloads-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .download-card {
        min-height: auto;
        padding: 1.5rem;
    }
    
    .platform-icon {
        font-size: 2.5rem;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .note-card {
        padding: 1.5rem;
    }
}
