
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a2e0a, #2d8c2d);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    overflow-y: auto;
}

.container {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 1200px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-in-out;
    margin: 20px 0;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

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

.back-button {
    background: linear-gradient(135deg, #005a30, #008a4d);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-button:hover {
    background: linear-gradient(135deg, #008a4d, #00aa60);
    box-shadow: 0 4px 8px rgba(0, 90, 48, 0.2);
    transform: translateY(-2px);
}

.main-actions {
    display: flex;
    gap: 10px;
    margin-left: auto; /* Pushes this block to the center-left */
    margin-right: 15px; /* Space before profile icon */
}

.storage-actions {
    display: flex;
    gap: 10px;
}

.storage-actions button, .toggle-button {
    background: linear-gradient(135deg, #005a30, #008a4d);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.storage-actions button:hover, .toggle-button:hover {
    background: linear-gradient(135deg, #008a4d, #00aa60);
    transform: scale(1.1);
}

.toggle-button.active {
    opacity: 1;
}

.toggle-button:not(.active) {
    opacity: 0.5;
    background: linear-gradient(135deg, #555, #777);
}

.toggle-button:not(.active):hover {
    opacity: 0.8;
}

/* Profile Icon and Dropdown */
.profile-container {
    position: relative;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #005a30;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    transition: background-color 0.3s;
}

.profile-icon:hover {
    background-color: #008a4d;
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 160px;
    z-index: 1001;
    overflow: hidden;
}

.profile-dropdown a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}

.profile-dropdown a:hover {
    background-color: #f1f1f1;
}

.profile-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid #eee;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1002;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1003;
    width: 90%;
    max-width: 400px;
    text-align: left;
}

.modal h2 {
    margin-top: 0;
    text-align: center;
    color: #333;
}

.modal .close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    border: none;
    background: none;
    cursor: pointer;
    color: #888;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal form input, .modal form select {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.modal form button {
    padding: 12px;
    background-color: #008a4d;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal form button:hover {
    background-color: #005a30;
}

.modal .form-link {
    text-align: center;
    color: #005a30;
    cursor: pointer;
    font-size: 14px;
}

#settingsForm hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid #eee;
}

#settingsForm label {
    font-weight: bold;
    margin-bottom: -10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
}

.description {
    color: #555;
    font-size: 16px;
    margin-bottom: 25px;
}

.upload-section {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.upload-section input[type="file"] {
    flex: 1;
    padding: 12px;
    border: 2px dashed #0a2e0a;
    border-radius: 8px;
    background: rgba(10, 46, 10, 0.1);
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.upload-section input[type="file"]:hover {
    border-color: #2d8c2d;
    background: rgba(45, 140, 45, 0.1);
}

.upload-section input[type="text"] {
    flex: 1;
    padding: 12px;
    border: 2px solid #0a2e0a;
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.upload-section input[type="text"]:focus {
    border-color: #2d8c2d;
    box-shadow: 0 0 8px rgba(45, 140, 45, 0.5);
    outline: none;
}

.file-preview {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.file-preview h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
}

.table-container {
    overflow-x: auto;
    max-width: 100%;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
    min-width: 600px;
}

.preview-table th, .preview-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.preview-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, #008a4d, #005a30);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 90, 48, 0.1);
    text-align: center;
}

.button:hover {
    background: linear-gradient(to right, #00aa60, #008a4d);
    box-shadow: 0 4px 8px rgba(0, 90, 48, 0.15);
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 90, 48, 0.1);
}

.button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: all 0.4s ease;
}

.button:hover::after {
    left: 150%;
}

.download-section {
    margin-top: 25px;
    display: none;
    justify-content: center;
    gap: 15px;
    animation: fadeIn 0.5s ease-in-out;
}

.download-section a {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #005a30, #008a4d);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-section a:hover {
    background: linear-gradient(135deg, #008a4d, #00aa60);
    box-shadow: 0 6px 12px rgba(0, 90, 48, 0.2);
    transform: translateY(-2px);
}

.download-section a:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dropdowns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    text-align: left;
}

.form-group select,
.form-group input[type="text"] {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-bottom: 5px;
}

.loading {
    display: none;
    text-align: center;
    margin: 10px 0;
}

.custom-input-container {
    position: relative;
}

.suggestions {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #0a2e0a;
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.suggestion-item {
    padding: 8px;
    cursor: pointer;
    color: #555;
}

.suggestion-item:hover {
    background: rgba(10, 46, 10, 0.1);
}

.editable-label {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
}

.editable-label:hover {
    background-color: rgba(10, 46, 10, 0.1);
}

.editable-label:after {
    content: '✎';
    margin-left: 5px;
    font-size: 12px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.editable-label:hover:after {
    opacity: 1;
}

.editable-label.editing {
    background-color: white;
    border: 1px solid #0a2e0a;
    padding: 3px 7px;
}

.editable-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #0a2e0a;
    border-radius: 4px;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    margin-bottom: 5px;
}

.video-guide {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.video-guide h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin-top: 15px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.play-button::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 25px solid #005a30;
    margin-left: 5px;
}

.video-placeholder:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.ad-container {
    width: 100%;
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.ad-container.bottom {
    margin-top: 30px;
}

.ad-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.ad-content {
    min-height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    .upload-section {
        flex-direction: column;
    }
    .download-section {
        flex-direction: column;
    }
    .dropdowns-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-table th, 
    .preview-table td {
        max-width: 120px;
        font-size: 12px;
        padding: 4px;
    }

    .header-icons {
        flex-wrap: wrap;
    }
    
    .back-button {
        order: 1;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .main-actions {
        order: 2;
        margin-left: 0;
    }
    
    .profile-container {
        order: 3;
        margin-left: auto;
    }
}