
/* Enhanced Modern Styling */
body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    margin: 0;
}

.header {
    background: linear-gradient(135deg, #6200EE, #3700B3);
    color: white;
    padding: 12px 20px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.editor-section, .preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-right: 1px solid #ddd;
}

.component-palette {
    background: #fafafa;
    padding: 12px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    border-bottom: 1px solid #ddd;
}

.component-item {
    background-color: #ffffff;
    color: #6200EE;
    border: 1px solid #6200EE;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.3s, color 0.3s;
    cursor: pointer;
}

.component-item:hover {
    background-color: #6200EE;
    color: white;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    background-color: #f0f0f0;
}

.tab {
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.3s;
}

.tab.active {
    background-color: white;
    border-bottom: 2px solid #6200EE;
    font-weight: bold;
}

.button {
    background-color: #6200EE;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.button:hover {
    background-color: #3700B3;
}

textarea#xmlEditor {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    border: none;
    outline: none;
    resize: none;
    padding: 12px;
    background-color: #f9f9f9;
}

.property-panel {
    background: #fdfdfd;
    border-left: 1px solid #ddd;
    box-shadow: -2px 0 5px rgba(0,0,0,0.05);
}

.android-screen {
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.editor-container {
    display: flex;
    height: 100%;
}

.line-numbers {
    background-color: #f0f0f0;
    color: #888;
    padding: 10px;
}

.preview-container {
    background-color: #f9f9f9;
    padding: 10px;
}


        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f5f5f5;
        }
        .container {
            display: flex;
            height: 100vh;
        }
        .editor-section {
            flex: 1;
            padding: 10px;
            background-color: #fff;
            border-right: 1px solid #ddd;
            display: flex;
            flex-direction: column;
        }
        .preview-section {
            flex: 1;
            padding: 10px;
            background-color: #f9f9f9;
            overflow: auto;
            display: flex;
            flex-direction: column;
        }
        .component-palette {
            height: 100px;
            overflow-x: auto;
            white-space: nowrap;
            padding: 10px;
            background-color: #eee;
            border-bottom: 1px solid #ddd;
            display: flex;
            gap: 8px;
        }
        .component-item {
            display: inline-block;
            padding: 5px 10px;
            background-color: #6200EE;
            color: white;
            border-radius: 4px;
            margin-right: 5px;
            cursor: pointer;
            font-size: 12px;
        }
        .component-item:hover {
            background-color: #3700B3;
        }
        .header {
            background-color: #6200EE;
            color: white;
            padding: 10px;
            font-weight: bold;
            margin-bottom: 10px;
        }
        #xmlEditor {
            width: 100%;
            height: 100%;
            border: 1px solid #ddd;
            padding: 10px;
            font-family: monospace;
            resize: none;
            flex-grow: 1;
            line-height: 1.5;
        }
        .preview-container {
            flex-grow: 1;
            border: 1px solid #ddd;
            background-color: white;
            position: relative;
            overflow: hidden;
        }
        .android-screen {
            width: 360px;
            height: 640px;
            margin: 20px auto;
            border: 8px solid #333;
            border-radius: 15px;
            position: relative;
            background-color: white;
            overflow: hidden;
        }
        .android-status-bar {
            height: 24px;
            background-color: #333;
            width: 100%;
        }
        .android-content {
            height: calc(100% - 24px);
            position: relative;
            overflow-y: auto;
        }
        .error-message {
            color: red;
            padding: 10px;
            margin-top: 10px;
            background-color: #ffeeee;
            border: 1px solid #ffcccc;
            display: none;
            max-height: 100px;
            overflow-y: auto;
        }
        .button {
            background-color: #6200EE;
            color: white;
            border: none;
            padding: 8px 15px;
            text-align: center;
            text-decoration: none;
            display: inline-block;
            font-size: 14px;
            margin: 5px 2px;
            cursor: pointer;
            border-radius: 4px;
        }
        .button:hover {
            background-color: #3700B3;
        }
        /* Android UI Component Styles */
        .android-textview {
            font-family: 'Roboto', sans-serif;
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        .android-button {
            background-color: #E0E0E0;
            border: none;
            border-radius: 4px;
            color: #000;
            padding: 8px 12px;
            text-align: center;
            box-sizing: border-box;
        }
        .android-edittext {
            border: 1px solid #CCCCCC;
            border-radius: 4px;
            padding: 8px;
            box-sizing: border-box;
            font-family: 'Roboto', sans-serif;
        }
        .android-imageview {
            background-color: #EEEEEE;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .android-checkbox {
            display: flex;
            align-items: center;
        }
        .android-checkbox::before {
            content: "";
            width: 16px;
            height: 16px;
            border: 2px solid #666;
            border-radius: 2px;
            margin-right: 8px;
            background-color: white;
        }
        .android-checkbox[data-checked="true"]::before {
            background-color: #6200EE;
            border-color: #6200EE;
        }
        .toolbar {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            margin-bottom: 10px;
        }
        .tools-group {
            display: flex;
            gap: 5px;
            flex-wrap: wrap;
        }
        
        /* Fix for LinearLayout */
        .android-linearlayout {
            display: flex;
            box-sizing: border-box;
        }
        .android-linearlayout[data-orientation="vertical"] {
            flex-direction: column;
        }
        .android-linearlayout[data-orientation="horizontal"] {
            flex-direction: row;
        }
        
        /* Table Layout Styles */
        .android-tablelayout {
            display: table;
            width: 100%;
            border-collapse: separate;
            box-sizing: border-box;
        }
        
        .android-tablerow {
            display: table-row;
            box-sizing: border-box;
        }
        
        /* ConstraintLayout Styles */
        .android-constraintlayout {
            position: relative;
            box-sizing: border-box;
        }
        
        /* For elements with constraints */
        [data-has-constraints="true"] {
            position: absolute;
        }
        
        /* Property Panel */
        .property-panel {
            width: 250px;
            background-color: #fff;
            border-left: 1px solid #ddd;
            padding: 10px;
            overflow-y: auto;
            display: none;
        }
        .property-panel.active {
            display: block;
        }
        .property-group {
            margin-bottom: 15px;
        }
        .property-group h3 {
            font-size: 14px;
            margin: 0 0 10px 0;
            padding-bottom: 5px;
            border-bottom: 1px solid #eee;
        }
        .property-row {
            display: flex;
            margin-bottom: 8px;
            font-size: 12px;
        }
        .property-label {
            flex: 1;
            padding-top: 6px;
        }
        .property-value {
            flex: 1;
        }
        .property-value input, .property-value select {
            width: 100%;
            padding: 4px;
            box-sizing: border-box;
        }
        
        /* Device Selection */
        .device-selection {
            display: flex;
            align-items: center;
            margin-left: 10px;
        }
        .device-selection select {
            padding: 6px;
            margin-left: 5px;
        }
        
        /* Drawable replacement styles */
        .cell-border-red {
            border: 1px solid #FF0000;
        }
        
        /* Add more drawable placeholders as needed */
        .btn-background {
            background-color: #2196F3;
            color: white;
        }
        
        /* Line number styles */
        .editor-container {
            position: relative;
            flex-grow: 1;
            display: flex;
        }
        .line-numbers {
            width: 40px;
            background-color: #f0f0f0;
            border-right: 1px solid #ddd;
            font-family: monospace;
            padding: 10px 5px;
            text-align: right;
            color: #888;
            user-select: none;
            overflow: hidden;
            line-height: 1.5;
        }
        
        /* Tab styling */
        .tabs {
            display: flex;
            border-bottom: 1px solid #ddd;
            background-color: #f0f0f0;
        }
        .tab {
            padding: 8px 15px;
            cursor: pointer;
            border-right: 1px solid #ddd;
        }
        .tab.active {
            background-color: white;
            border-bottom: 2px solid #6200EE;
        }
		
        /* Card View styling */		
		.android-cardview {
			border: 1px solid #ccc;
			border-radius: 8px;
			background-color: #fff;
			padding: 16px;
			margin-bottom: 16px;
			box-shadow: 0 2px 4px rgba(0,0,0,0.1);
		}
		
		
		.android-recyclerview {
			list-style: none;
			padding: 0;
			margin: 0;
			border: 1px solid #ccc;
		}

		.recyclerview-item {
			padding: 12px;
			border-bottom: 1px solid #eee;
			font-family: sans-serif;
		}

		.android-viewpager2 {
			display: flex;
			overflow-x: auto;
			scroll-snap-type: x mandatory;
			gap: 16px;
			padding: 10px;
			border: 1px solid #ddd;
			background: #fafafa;
		}

		.viewpager-page {
			flex: 0 0 80%;
			scroll-snap-align: center;
			background: #e3f2fd;
			padding: 20px;
			border-radius: 8px;
			min-height: 100px;
			text-align: center;
		}

		[draggable="true"] {
			cursor: move;
		}

		.drop-target {
			border: 2px dashed #6200EE;
		}


		[draggable="true"] {
			cursor: move;
		}

		.drop-target {
			outline: 2px dashed #6200EE;
			background-color: #f0f8ff;
		}


	 	

    


.android-tablelayout {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    border: 1px solid #4a4aff;
}

.android-tablerow td {
    border: 1px solid #4a4aff;
    padding: 6px;
    text-align: left;
    font-family: sans-serif;
    font-size: 14px;
}

.android-textview {
    padding: 6px;
}
