* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f7fafd;
    min-height: 100vh;
    color: #333;
    /* Fully black and opaque watermark pattern */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='50'><text x='0' y='35' font-size='26' font-family='Segoe UI,Tahoma,Geneva,Verdana,sans-serif' fill='black' fill-opacity='1' transform='rotate(45 80 35)'>we are the GrandFather of Adx &amp; AdSence</text></svg>");
    background-repeat: repeat;
    background-size: 150px 50px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    height: fit-content;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

.data-preview {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.data-preview h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

th, td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e3f2fd;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
}

.delete-btn:hover {
    background: #c82333;
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1200px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        order: 2;
    }
    
    .data-preview {
        order: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .form-container,
    .data-preview {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    table {
        font-size: 10px;
    }
    
    th, td {
        padding: 6px 8px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* Error message */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.watermark-bg {
    display: none;
}

.simple-container, .simple-form, #simpleMessage {
    position: relative;
    z-index: 1;
}

.main-header, .main-footer {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 12px 0;
    background: rgba(0,0,0,0.04);
    color: #000;
    letter-spacing: 1px;
    position: relative;
    z-index: 10;
}

.main-header {
    top: 0;
    left: 0;
}

.main-footer {
    bottom: 0;
    left: 0;
    margin-top: 40px;
}

.sidebar {
    position: fixed;
    top: 60px;
    bottom: 60px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 1rem;
    font-weight: bold;
    color: #000;
    background: rgba(0,0,0,0.03);
    z-index: 10;
    letter-spacing: 1px;
    opacity: 1;
    user-select: none;
}
.left-sidebar {
    left: 0;
}
.right-sidebar {
    right: 0;
}

.simple-container {
    margin-left: 60px;
    margin-right: 60px;
    margin-top: 40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 20;
}

@media (max-width: 700px) {
    .sidebar {
        display: none;
    }
    .simple-container {
        margin-left: 0;
        margin-right: 0;
    }
} 