:root {
    --primary-color: #017BFE;
    --secondary-color: #017BFE;
    --accent-color: #017BFE;
    --background-color: #ffffff;
    --text-color: #333333;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 2rem;
}

header {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 0 0 30px 30px;
    text-align: center;
}

.logo {
    height: 50px;
    margin-bottom: 1rem;
    width: auto;
}

header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.tile {
    background: var(--gray-light);
    border-radius: 15px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
}

.tile i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.tile h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tile p i {
    font-size: 1rem;
    margin-right: 0.5rem;
    display: inline;
    color: #666;
}

.tile p {
    font-size: 0.9rem;
    color: #666;
}

/* Modal System */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    position: relative;
    width: 100%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100% - 3.5rem);
}

.modal-large {
    width: 90%;
    max-width: 1000px;
    margin: 1.75rem;
}

.modal-small {
    width: 90%;
    max-width: 400px;
    margin: 1.75rem;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    padding: 2rem;
    margin: 0 auto;
}



/* Iframe Modal */
#iframe-modal .modal-content {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

#iframe-modal .close-button {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    background: #007bff;
    color: white;
    height: 5rem;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

#iframe-modal .close-button:hover {
    background: #0056b3;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

#content-frame {
    width: 100%;
    height: 100vh;
    border: none;
    display: block;
    background: white;
}

.error-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 1001;
    text-align: center;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.error-message i {
    font-size: 2rem;
    color: #dc3545;
}

.error-message h3 {
    margin: 0;
    color: #333;
}

.error-message p {
    margin: 0;
    color: #666;
}

.error-message button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background: #007bff;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.error-message button:hover {
    background: #0056b3;
}

.error-message {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none;
}

.error-message i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-message h3 {
    margin-bottom: 1rem;
    color: #333;
}

.error-message p {
    color: #666;
    margin-bottom: 1.5rem;
}

.error-message button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.error-message button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.close-button {
    position: absolute;
    right: 10px;
    top: 10px;
    background: white;
    border: none;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.close-button:hover {
    background: #f5f5f5;
}

#content-frame {
    width: 100%;
    height: 100%;
    background: white;
    display: block;
    border: none;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    width: 1000px;
    margin: 0;
}

.modal-content {
    width: auto;
    max-width: 400px;
    margin: auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    position: relative;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* QR Code Modal */
.qr-content {
    text-align: center;
    padding: 1rem;
}

.qr-content h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.qr-content p {
    margin-bottom: 2rem;
    color: var(--text-color);
}

#qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 1rem;
    background: white;
    border-radius: 10px;
}

#qr-code img,
#qr-code canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.qr-modal-content h2 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.qr-modal-content p {
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 1rem;
}

.qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
}

#qr-code canvas {
    display: block;
    margin: 0 auto;
}

#qr-code {
    margin: 2rem auto;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 100%;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Subdomain Modal */
.subdomain-input-group {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

#subdomain-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

.domain-suffix {
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    color: #666;
    border-left: 1px solid #ddd;
}

.primary-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.primary-button:hover {
    background: var(--secondary-color);
}

.subdomain-input-group input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    font-size: 1rem;
    outline: none;
}

.domain-suffix {
    padding: 0.8rem;
    background: #f5f5f5;
    color: #666;
    border-left: 1px solid #ddd;
    font-family: monospace;
}

.modal-content button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-content button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 49, 146, 0.3);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .tiles-grid {
        grid-template-columns: 1fr;
    }
}
