/* URL Shortener Stylesheet - Updated */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header h1 {
    display: inline-block;
}

.header .nav {
    float: right;
    margin-top: 10px;
}

.header .nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.header .nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Main Content */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 120px);
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.2);
}

.form-control:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #27ae60;
}

.btn-success:hover {
    background-color: #219a52;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: #f39c12;
}

.btn-warning:hover {
    background-color: #d68910;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.btn:disabled:hover {
    background-color: #95a5a6;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

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

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

/* URL Display */
.url-item {
    background: #f8f9fa;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.url-item.inactive {
    border-left-color: #e74c3c;
    background: #fdf2f2;
}

.url-original {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    word-break: break-all;
}

.url-short {
    color: #3498db;
    font-family: monospace;
    margin-bottom: 5px;
    font-size: 16px;
}

.url-stats {
    font-size: 14px;
    color: #7f8c8d;
}

.url-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    display: inline-block;
    margin-left: 10px;
}

.url-status.active {
    background-color: #27ae60;
}

.url-status.inactive {
    background-color: #e74c3c;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #3498db;
}

.stat-label {
    color: #7f8c8d;
    margin-top: 10px;
}

/* Help Section - Improved Styling */
.help-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.help-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.help-item h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

.help-item p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}

.help-item ul {
    margin-left: 20px;
    color: #666;
}

.help-item li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Account Information Grid */
.account-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.account-info-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.account-info-item strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.account-info-item span {
    color: #7f8c8d;
}

/* Footer */
.footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .nav {
        float: none;
        margin-top: 20px;
    }

    .header .nav a {
        display: block;
        margin: 5px 0;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .help-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .account-info-grid {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 14px;
    }

    .table th,
    .table td {
        padding: 8px;
    }

    .card {
        padding: 20px;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-number {
        font-size: 2em;
    }

    .help-item {
        padding: 15px;
    }
}

/* Copy to clipboard button */
.copy-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    color: #2980b9;
    background-color: rgba(52, 152, 219, 0.1);
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #7f8c8d; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }

/* Verification status indicators */
.verification-status {
    font-size: 14px;
    margin-left: 10px;
}

.verification-status.verified {
    color: #27ae60;
}

.verification-status.pending {
    color: #f39c12;
}

.verification-status.unverified {
    color: #e74c3c;
}

/* Custom checkbox styling */
.checkbox-container {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 3px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #3498db;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Role-based restrictions styling */
.feature-locked {
    opacity: 0.6;
    position: relative;
}

.feature-locked::after {
    content: "🔒 Premium Feature";
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 12px;
    color: #f39c12;
    font-weight: 600;
}

.upgrade-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    text-align: center;
}

.upgrade-notice a {
    color: #fff;
    text-decoration: underline;
}

/* Improved form styling */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Enhanced table for mobile */
@media (max-width: 768px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    .table-responsive .table {
        width: max-content;
        min-width: 100%;
    }
}
