body {
    background-color: #ffffff;
    color: #333;
    font-family: 'Arial', sans-serif;
}

/* [CUSTOM] Global Responsive Fixes */
img,
input,
select,
textarea,
.form-control {
    max-width: 100%;
    box-sizing: border-box;
}

img {
    height: auto;
}

.cyber-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 50px;
    text-align: center;
}

.cyber-section {
    padding: 50px 0;
    border-bottom: 1px solid #eee;
}

.feature-icon {
    font-size: 3rem;
    color: #667eea;
}

.btn-cyber {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.btn-cyber:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.lang-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 100;
}

.chat-box {
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    background-color: rgba(0, 123, 255, 0.1);
}

.baas-box {
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.3);
    border-radius: 10px;
    padding: 20px;
    background-color: rgba(40, 167, 69, 0.1);
}

.wallet-box {
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    padding: 20px;
    background-color: rgba(255, 193, 7, 0.1);
}

.game-box {
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.3);
    border-radius: 10px;
    padding: 20px;
    background-color: rgba(220, 53, 69, 0.1);
}

.btn-login-custom {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 12px 80px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 20px;
}

.btn-login-custom:hover {
    background-color: #fff;
    color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

#lang-select {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    border-radius: 20px;
    padding: 5px 15px;
    height: auto;
    backdrop-filter: blur(5px);
    cursor: pointer;
    outline: none;
}

#lang-select option {
    background-color: #333;
    color: #fff;
}

#lang-select:focus {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

/* New Styles for Spacing and Typography */
.section {
    padding: 100px 0;
}

.section-head {
    margin-bottom: 60px;
}

.text-primary-custom {
    color: #dc3545 !important;
}

.text-secondary-custom {
    color: #28a745 !important;
}

.section-title {
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    letter-spacing: -1px;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 30px;
}

.text-desc {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.7;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    z-index: 1000;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#btn-back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

#btn-back-to-top i {
    font-size: 1.2rem;
}

.diagram-area {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
    z-index: 1;
    width: 100%;
}

.diagram-img {
    max-height: 400px;
    width: auto;
    opacity: 1;
}

@media (min-width: 992px) {
    .diagram-area {
        position: absolute;
        top: 70%;
        /* Adjusted to be slightly lower for equal spacing */
        left: 50%;
        transform: translate(-50%, -50%);
        margin-bottom: 0;
        pointer-events: none;
    }

    .diagram-img {
        max-height: 550px;
    }
}

.promo-section {
    padding: 0 !important;
}

.promo-col {
    padding: 60px 30px;
    height: 100%;
}

.promo-img {
    max-width: 80%;
    height: auto;
    margin: 30px auto;
    display: block;
}

.text-shadow-sm {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.partner-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 8px 20px;
    color: #fff;
    font-size: 0.9rem;
    display: inline-block;
    margin: 5px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.partner-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Styles from matrixRe.php */
.appBottomMenu {
    display: none !important;
}

#myDiagramDiv {
    overflow: auto !important;
}

/* #appCapsule { overflow: auto !important; } - Removed to prevent scroll locking on other pages */

#myDiagramDiv canvas {
    padding-bottom: 50px !important;
    /* 여백 추가 */
}

/* Styles from login.php */
.cyber-header-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    margin-bottom: 20px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.cyber-header-login .lead {
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 1;
    margin-top: 15px;
    color: #ffffff !important;
}

.home-button {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.btn-home {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-home:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: scale(1.1);
}

.login-capsule {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.5);
}

.btn-register-custom {
    background-color: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 50px !important;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-register-custom:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: transparent;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.form-button-group {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    background: transparent !important;
    padding: 0 !important;
    width: 100% !important;
    z-index: auto !important;
}

@media (max-width: 768px) {
    .cyber-header-login {
        padding-bottom: 30px !important;
        /* Reduce bottom padding to move form up */
    }

    .login-form {
        margin-top: 20px !important;
        /* Reduce top margin */
        width: 80% !important;
        /* Reduce width */
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 320px;
        /* Max width constraint */
    }

    .login-form .section {
        margin-bottom: 20px !important;
    }


    .form-group.boxed .form-control {
        height: 45px;
    }
}

/* Tomatok Responsive Symbol */
.tomatok-symbol-responsive {
    width: 240px;
}

@media (max-width: 768px) {
    .tomatok-symbol-responsive {
        width: 168px !important;
        /* 70% of 240px */
        right: 0px !important;
        /* Set to 0 to prevent cutoff */
        top: -30px !important;
    }


}