/* 
 * Account Manager - Responsive CSS
 * Mobile and Desktop same design
 */

:root {
    /* Color Variables */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #dbeafe;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Neutral Colors */
    --light: #f8fafc;
    --dark: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* UI Variables */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
    --shadow-md: 0 6px 12px -2px rgb(0 0 0 / 0.1), 0 4px 6px -1px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.1), 0 8px 10px -2px rgb(0 0 0 / 0.04);
    --transition: all 0.2s ease;
}

/* Base Styles */
.am-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--gray-800);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    min-height: 100vh;
}

/* Loading Overlay */
.am-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.am-loading-overlay.active {
    display: flex;
}

.am-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: am-spin 1s linear infinite;
}

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

/* Header Styles */
.am-header {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    text-align: center;
}

.am-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.am-logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.am-logo-text h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.am-logo-text p {
    color: var(--gray-500);
    font-size: 14px;
    margin: 0;
}

.am-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 400px;
    margin: 0 auto;
}

.am-stat-item {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 16px;
    text-align: center;
}

.am-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.am-stat-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Site Section */
.am-site-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.am-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
}

.am-section-title i {
    color: var(--primary);
    font-size: 20px;
}

.am-account-status {
    margin-left: auto;
    padding: 6px 12px;
    background: var(--warning);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.am-account-status.available {
    background: var(--success);
}

.am-account-status.used {
    background: var(--danger);
}

.am-site-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.am-site-btn {
    padding: 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.am-site-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.am-site-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.am-site-btn i {
    font-size: 28px;
    margin-bottom: 4px;
}

.am-site-btn span {
    font-size: 16px;
    font-weight: 600;
}

.am-site-btn .am-site-status {
    font-size: 12px;
    opacity: 0.8;
    font-weight: normal;
}

.am-site-btn.active .am-site-status {
    opacity: 0.9;
}

.am-site-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: var(--primary-light);
    padding: 20px;
    border-radius: var(--border-radius);
}

.am-site-stat {
    text-align: center;
}

.am-site-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.am-site-stat-label {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.am-site-remaining {
    font-size: 12px;
    color: var(--gray-500);
}

/* Account Section */
.am-account-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.am-account-card {
    background: linear-gradient(135deg, var(--primary-light) 0%, #eff6ff 100%);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--gray-200);
}

.am-account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.am-account-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 16px;
}

.am-btn-copy-all {
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.am-btn-copy-all:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.am-account-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.am-detail-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.am-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.am-detail-label {
    flex: 0 0 80px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.am-detail-label i {
    color: var(--primary);
    width: 20px;
}

.am-detail-value {
    flex: 1;
    font-family: 'Courier New', monospace;
    color: var(--gray-600);
    font-size: 14px;
    padding: 0 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-btn-copy {
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.am-btn-copy:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Action Buttons */
.am-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.am-btn {
    padding: 18px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.am-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.am-btn-mark-used:hover {
    background: #dc2626;
}

.am-btn-skip {
    background: var(--warning);
    color: white;
}

.am-btn-skip:hover {
    background: #d97706;
}

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

.am-btn-new:hover {
    background: #059669;
}

/* Admin Actions */
.am-admin-actions {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.am-btn-reset {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 12px 24px;
    font-size: 14px;
}

.am-btn-reset:hover {
    background: var(--gray-300);
}

/* Toast Notification */
.am-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: white;
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9998;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 400px;
    width: calc(100% - 40px);
}

.am-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.am-toast.success {
    border-left: 4px solid var(--success);
}

.am-toast.warning {
    border-left: 4px solid var(--warning);
}

.am-toast.error {
    border-left: 4px solid var(--danger);
}

.am-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.am-toast.warning .am-toast-icon {
    background: var(--warning);
}

.am-toast.error .am-toast-icon {
    background: var(--danger);
}

.am-toast-content {
    flex: 1;
    min-width: 0;
}

.am-toast-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
    font-size: 16px;
}

.am-toast-message {
    color: var(--gray-600);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive Design - Same design for all devices */
@media (min-width: 640px) {
    .am-container {
        max-width: 640px;
        padding: 32px;
    }
    
    .am-logo {
        flex-direction: row;
        justify-content: center;
    }
    
    .am-logo-text h1 {
        font-size: 28px;
    }
    
    .am-logo-text p {
        font-size: 15px;
    }
    
    .am-stats {
        max-width: 500px;
    }
    
    .am-stat-value {
        font-size: 32px;
    }
    
    .am-stat-label {
        font-size: 13px;
    }
    
    .am-section-title {
        font-size: 20px;
    }
    
    .am-site-btn {
        padding: 24px;
    }
    
    .am-site-btn i {
        font-size: 32px;
    }
    
    .am-site-btn span {
        font-size: 18px;
    }
    
    .am-site-stat-value {
        font-size: 36px;
    }
    
    .am-account-name {
        font-size: 22px;
    }
    
    .am-detail-label {
        flex: 0 0 100px;
        font-size: 15px;
    }
    
    .am-detail-value {
        font-size: 15px;
    }
    
    .am-action-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .am-btn {
        padding: 20px;
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    .am-container {
        max-width: 768px;
        padding: 40px;
    }
    
    .am-header {
        padding: 32px;
    }
    
    .am-logo-icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
    
    .am-logo-text h1 {
        font-size: 32px;
    }
    
    .am-stats {
        max-width: 600px;
    }
    
    .am-stat-item {
        padding: 20px;
    }
    
    .am-stat-value {
        font-size: 36px;
    }
    
    .am-site-section,
    .am-account-section {
        padding: 32px;
    }
    
    .am-account-card {
        padding: 32px;
    }
    
    .am-account-name {
        font-size: 24px;
    }
    
    .am-btn-copy-all {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .am-btn-copy {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .am-btn {
        padding: 22px;
        font-size: 17px;
    }
}

@media (min-width: 1024px) {
    .am-container {
        max-width: 1024px;
        padding: 48px;
    }
    
    .am-header {
        padding: 40px;
    }
    
    .am-logo-icon {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }
    
    .am-logo-text h1 {
        font-size: 36px;
    }
    
    .am-logo-text p {
        font-size: 16px;
    }
    
    .am-stats {
        max-width: 700px;
    }
    
    .am-stat-value {
        font-size: 40px;
    }
    
    .am-stat-label {
        font-size: 14px;
    }
    
    .am-site-stats {
        padding: 24px;
    }
    
    .am-site-stat-value {
        font-size: 40px;
    }
    
    .am-account-card {
        padding: 40px;
    }
    
    .am-account-name {
        font-size: 26px;
    }
    
    .am-detail-label {
        flex: 0 0 120px;
        font-size: 16px;
    }
    
    .am-detail-value {
        font-size: 16px;
    }
    
    .am-btn {
        padding: 24px;
        font-size: 18px;
    }
    
    .am-toast {
        max-width: 500px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .am-container {
        background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
        color: var(--gray-100);
    }
    
    .am-header,
    .am-site-section,
    .am-account-section {
        background: var(--gray-800);
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    }
    
    .am-logo-text h1 {
        color: var(--gray-100);
    }
    
    .am-logo-text p {
        color: var(--gray-400);
    }
    
    .am-stat-item {
        background: var(--gray-700);
    }
    
    .am-stat-label {
        color: var(--gray-400);
    }
    
    .am-section-title {
        color: var(--gray-100);
    }
    
    .am-site-btn {
        background: var(--gray-700);
        border-color: var(--gray-600);
        color: var(--gray-100);
    }
    
    .am-site-btn:hover {
        background: var(--gray-600);
    }
    
    .am-site-btn.active {
        background: var(--primary);
        color: white;
    }
    
    .am-site-stats {
        background: var(--gray-700);
    }
    
    .am-site-stat-label {
        color: var(--gray-400);
    }
    
    .am-site-remaining {
        color: var(--gray-500);
    }
    
    .am-account-card {
        background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-800) 100%);
        border-color: var(--gray-600);
    }
    
    .am-account-name {
        color: var(--gray-100);
    }
    
    .am-btn-copy-all {
        background: var(--gray-700);
        border-color: var(--gray-600);
        color: var(--gray-100);
    }
    
    .am-btn-copy-all:hover {
        background: var(--primary);
        color: white;
    }
    
    .am-detail-label {
        color: var(--gray-300);
    }
    
    .am-detail-value {
        color: var(--gray-300);
    }
    
    .am-btn-copy {
        background: var(--gray-700);
        border-color: var(--gray-600);
        color: var(--gray-100);
    }
    
    .am-btn-copy:hover {
        background: var(--primary);
        color: white;
    }
    
    .am-toast {
        background: var(--gray-800);
        color: var(--gray-100);
    }
    
    .am-toast-title {
        color: var(--gray-100);
    }
    
    .am-toast-message {
        color: var(--gray-300);
    }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .am-container {
        padding: 16px;
    }
    
    .am-header {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .am-logo {
        margin-bottom: 16px;
    }
    
    .am-logo-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .am-logo-text h1 {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .am-logo-text p {
        font-size: 12px;
    }
    
    .am-stats {
        gap: 12px;
    }
    
    .am-stat-item {
        padding: 12px;
    }
    
    .am-stat-value {
        font-size: 24px;
    }
    
    .am-stat-label {
        font-size: 11px;
    }
    
    .am-site-section,
    .am-account-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .am-section-title {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .am-site-buttons {
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .am-site-btn {
        padding: 16px;
    }
    
    .am-site-btn i {
        font-size: 24px;
    }
    
    .am-site-btn span {
        font-size: 14px;
    }
    
    .am-site-stats {
        padding: 16px;
    }
    
    .am-site-stat-value {
        font-size: 28px;
    }
    
    .am-account-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .am-account-header {
        margin-bottom: 16px;
    }
    
    .am-account-name {
        font-size: 18px;
    }
    
    .am-btn-copy-all {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .am-account-details {
        gap: 12px;
    }
    
    .am-detail-row {
        padding: 8px 0;
    }
    
    .am-detail-label {
        flex: 0 0 70px;
        font-size: 13px;
    }
    
    .am-detail-value {
        font-size: 13px;
        padding: 0 12px;
    }
    
    .am-btn-copy {
        padding: 6px 10px;
        min-width: 50px;
        font-size: 11px;
    }
    
    .am-action-buttons {
        gap: 8px;
    }
    
    .am-btn {
        padding: 14px;
        font-size: 14px;
        gap: 8px;
    }
    
    .am-admin-actions {
        margin-top: 16px;
        padding-top: 16px;
    }
    
    .am-btn-reset {
        padding: 10px 20px;
        font-size: 13px;
    }
}