/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

:root {
    --primary: #00ACC1;
    --primary-dark: #00838F;
    --primary-light: #4DD0E1;
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-600: #757575;
    --gray-800: #424242;
    --success: #4CAF50;
    --error: #F44336;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    min-height: 100vh;
    line-height: 1.5;
}

/* Sayfa Yapısı */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Kart */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.card h1 {
    color: var(--primary-dark);
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 24px;
}

/* Form Elemanları */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
}

.input-group input::placeholder {
    color: var(--gray-400);
}

/* Butonlar */
.btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:active {
    background: var(--primary-dark);
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 20px;
    width: auto;
}

/* Link Text */
.link-text {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--gray-600);
}

.link-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard */
#dashboard-page {
    justify-content: flex-end;
    padding: 20px;
    padding-bottom: 30px;
    background: var(--gray-100);
}

/* Desktop'ta üstten başla */
@media (min-width: 600px) {
    #dashboard-page {
        justify-content: flex-start;
        padding-top: 40px;
    }
}

/* Gates Grid */
.gates-grid {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 10px;
}

/* Gate Card */
.gate-card {
    background: var(--white);
    border-radius: 16px;
    padding: 30px 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    user-select: none;
}

.gate-card:active {
    transform: scale(0.98);
}

.gate-card.loading {
    pointer-events: none;
    opacity: 0.6;
    background: var(--gray-100);
}

.gate-card.loading .power-icon {
    border-color: var(--gray-400);
}

.gate-card.loading .power-icon svg {
    stroke: var(--gray-400);
    animation: pulse 1s ease-in-out infinite;
}

.gate-card.loading .gate-name,
.gate-card.loading .gate-icon {
    color: var(--gray-400);
}

/* Power Icon */
.power-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--gray-300);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.power-icon svg {
    width: 50px;
    height: 50px;
    stroke: var(--gray-400);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Gate Info */
.gate-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.gate-icon {
    color: var(--primary);
    font-size: 24px;
    font-weight: bold;
}

.gate-icon.full {
    color: var(--error);
}

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.toast.success {
    background: var(--success);
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive - Tablet */
@media (min-width: 600px) {
    .gates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive - Desktop */
@media (min-width: 900px) {
    .card {
        padding: 40px;
    }

    .card h1 {
        font-size: 28px;
    }

    .gates-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gate-card {
        padding: 40px 30px;
    }

    .power-icon {
        width: 120px;
        height: 120px;
    }

    .power-icon svg {
        width: 60px;
        height: 60px;
    }
}


