* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px 20px 20px 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    margin-top: 40px;
}

.card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 1);
    outline: 1px solid rgba(255, 255, 255, 0.6);
    outline-offset: -1px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.status-section {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.status-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.status-display {
    display: flex;
    justify-content: center;
    align-items: center;
}

.status-badge {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.status-badge.online {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.4);
}

.status-badge.offline {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(235, 51, 73, 0.4);
}

.toggle-section {
    padding: 30px 20px;
    text-align: center;
}

.toggle-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 500;
}

.toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.toggle-input {
    display: none;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 200px;
    height: 60px;
    cursor: pointer;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    border-radius: 60px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(235, 51, 73, 0.3);
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 50px;
    width: 50px;
    left: 5px;
    bottom: 5px;
    background: white;
    border-radius: 50%;
    transition: all 0.4s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-switch .toggle-slider {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
}

.toggle-input:checked + .toggle-switch .toggle-slider:before {
    transform: translateX(140px);
}

.toggle-text-off,
.toggle-text-on {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
    z-index: 1;
    width: 60px;
}

.toggle-text-off {
    right: 20px;
    opacity: 1;
    text-align: right;
}

.toggle-text-on {
    left: 20px;
    opacity: 0;
    text-align: left;
}

.toggle-input:checked + .toggle-switch .toggle-text-off {
    opacity: 0;
}

.toggle-input:checked + .toggle-switch .toggle-text-on {
    opacity: 1;
}

.info-section {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    font-size: 13px;
    color: #666;
}

.info-item:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
}

.info-icon {
    font-size: 20px;
    margin-right: 12px;
}

.info-text {
    flex: 1;
}

.message {
    margin: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .header h1 {
        font-size: 20px;
    }
    
    .status-badge {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .toggle-switch {
        width: 180px;
        height: 55px;
    }
    
    .toggle-input:checked + .toggle-switch .toggle-slider:before {
        transform: translateX(125px);
    }
    
    .toggle-slider:before {
        height: 45px;
        width: 45px;
    }
    
    .card {
        border-radius: 15px;
    }
}

@media (max-width: 400px) {
    .header {
        padding: 25px 15px;
    }
    
    .status-section,
    .toggle-section {
        padding: 25px 15px;
    }
    
    .toggle-switch {
        width: 160px;
        height: 50px;
    }
    
    .toggle-input:checked + .toggle-switch .toggle-slider:before {
        transform: translateX(110px);
    }
    
    .toggle-slider:before {
        height: 40px;
        width: 40px;
    }
}

/* Access Code Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
    overflow: auto;
    box-sizing: border-box;
}

.modal-overlay.show {
    display: flex !important;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    min-width: 280px;
    margin: auto;
    overflow: hidden;
    animation: slideUpModal 0.3s ease-out;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.modal-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 700;
}

.modal-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.modal-body {
    padding: 30px 20px;
}

.access-input {
    width: 100%;
    max-width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-align: center;
    box-sizing: border-box;
}

.access-input:focus {
    border-color: #11998e;
    box-shadow: 0 0 0 3px rgba(17, 153, 142, 0.1);
}

.modal-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.modal-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.modal-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.modal-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.btn-submit {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Blur effect untuk content di belakang modal */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

body.modal-open .container {
    filter: blur(5px);
    -webkit-filter: blur(5px);
    pointer-events: none;
    opacity: 0.5;
}

/* Responsive fixes untuk modal */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 25px 15px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 25px 15px;
    }
    
    .modal-footer {
        padding: 15px;
    }
    
    .access-input {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .btn-submit {
        padding: 10px 30px;
        font-size: 14px;
    }
}

@media (max-height: 600px) {
    .modal-content {
        margin: 10px auto;
    }
    
    .modal-header {
        padding: 20px 15px;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
}

